QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#597831#4413. Cyber Languageship2077#AC ✓1ms3492kbC++23414b2024-09-28 19:02:412024-09-28 19:02:43

Judging History

你现在查看的是最新测评结果

  • [2024-09-28 19:02:43]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3492kb
  • [2024-09-28 19:02:41]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
void solve(){
    string str;
    getline(cin,str);
    int len=str.length();
    for (int i=0;i<len;i++)
        if (!i||str[i-1]==' ')
            cout<<char(str[i]-'a'+'A');
    cout<<endl;
}
int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int T;cin>>T;
    string str;getline(cin,str);
    while (T--) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3492kb

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