8.17 ZOOM 笔试
20道单选 10道不定项 编程题1 1道 编程题2 1道
早知道编程这么简单 就先做编程了
第一题 大小写转换
#include <iostream>
using namespace std;
int main(){
string str = "";
getline(cin, str);
for(auto &it:str)
if((it >= 'a' && it <= 'z') || (it >= 'A' && it <= 'Z'))
it ^= ' ';
cout << str;
return 0;
}第二题 格式转换
#include <iostream>
using namespace std;
int main(){
string str = "", res = "";
cin >> str;
for(int i=0; i<str.size(); i+=2)
res += string(str[i+1]-'0', str[i]);
cout << res << endl;
return 0;
}
深信服公司福利 801人发布