QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#41288 | #4413. Cyber Language | DaBenZhongXiaSongKuaiDi# | AC ✓ | 3ms | 3724kb | C++14 | 496b | 2022-07-29 13:35:54 | 2022-07-29 13:35:55 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
inline int read()
{
int n=0,f=1,ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
n=n*10+ch-'0';
ch=getchar();
}
return n*f;
}
int main()
{
int t,ch;
string s;
t=read();
for(int greg=1;greg<=t;greg++)
{
getline(cin,s,'\n');
for(int i=0;i<s.length();i++)
{
if(i==0||s[i-1]==' ')printf("%c",s[i]-'a'+'A');
}
printf("\n");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3724kb
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