- A+B 输入输出练习I
SQL语句批量生产
- 2024-4-30 16:55:52 @
#include #include #include using namespace std;
vectorresult;
// 字段内容,操作,表明,巴拉
string solu(string s,string str1,string str2,string str3){ string str; char a = '''; char b = ','; str.push_back(a); for(int i = 0;i<s.size();i++){ if(s[i] == ' '){ str.push_back(a); str.push_back(b); str.push_back(a); }else{ str.push_back(s[i]); } } str.push_back(a); string ans; ans = str1 + str2+str3+"("+str+");"; result.push_back(ans); return ans; }
int main(){ string str; while(1){ getline(cin,str); if(str == "quit"){ break;} solu(str,"INSERT ","msq_sc ","VALUES"); // cout << solu(str,"INSERT ","msq ","VALUES")<<endl; }
for(auto i:result){
cout << i<<endl;
}
return 0;
}
0 comments
No comments so far...
Information
- ID
- 1
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 989
- Accepted
- 162
- Uploaded By