Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
123674 | 张铖睿 | 词组缩写 | C++ | Accepted | 1 MS | 280 KB | 432 | 2025-07-09 09:18:35 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; char str[120]; getchar(); while (n--){ cin.getline(str,120); bool flag = true; for (int i=0;str[i]!='\0';i++) { if(flag && str[i]!=' '){ char tmp=str[i]; if(str[i]>='a'&&str[i]<='z') tmp-=32; cout<<tmp; flag=false; } else if (str[i]==' ') flag=true; } cout<<endl; } return 0; }