QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#42675#4413. Cyber Language01shijian#AC ✓1ms3728kbC++17632b2022-08-03 14:27:522022-08-03 14:27:53

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-08-03 14:27:53]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3728kb
  • [2022-08-03 14:27:52]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long 
using namespace std;
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
typedef long long LL;
typedef pair<int,int> PII;
mt19937 rnd();
const int mod = 1e9 + 7;

string s;
void solve(){
	getline(cin, s);
	cout << char(towupper(s[0]));
	for(int i = 1; i < s.size() - 1; i ++){
		if(s[i] == ' '){
			cout << char(towupper(s[i + 1]));
		}
	}
	
}	

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr); 
    int _; cin >> _;
	getline(cin, s);    
    while(_ --){
    	solve();
    	cout << '\n';
    }
    return 0;
}

詳細信息

Test #1:

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

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