QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#93902 | #4413. Cyber Language | Tobo# | AC ✓ | 3ms | 3328kb | C++11 | 585b | 2023-04-03 19:40:14 | 2023-04-03 19:40:18 |
Judging History
answer
#include <bits/stdc++.h>
#define N 200005
using i64 = long long;
using namespace std;
void solve(){
int t;
cin >> t;
getchar();
string st;
while(t --){
getline(cin,st);
string ans;
for(int i= 0; i < st.size(); i++){
if(i == 0) ans += char(st[i] -'a' + 'A');
else if(st[i - 1] ==' ') ans += char(st[i] -'a' + 'A');
}
cout <<ans << endl;
st.clear();
}
}
signed main()
{
// ios::sync_with_stdio(false);
// cin.tie(0);
// cout.tie(0);
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3328kb
input:
10 qing lian xi wo bao gao wo dai ni men da da shi suo qu bao dao yong yuan de shen xiao si wo le shi zhen de ni shuo de dou dui yin yang guai qi
output:
QLXW BG WDNMD DSSQ BD YYDS XSWL SZD NSDDD YYGQ
result:
ok 10 lines