QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#53443#4413. Cyber Languageneko_nyaa#AC ✓2ms3652kbC++20444b2022-10-05 11:08:512022-10-05 11:08:52

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-05 11:08:52]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3652kb
  • [2022-10-05 11:08:51]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long

char toUpperCase(char c) {
	c -= 'a';
	c += 'A';
	return c;
}

void solve() {
	string s; getline(cin, s);
	stringstream ss; ss << s;

	string t;
	while (ss >> t) {
		cout << toUpperCase(t[0]);
	}
	cout << '\n';
}

signed main() {
	ios::sync_with_stdio(0); cin.tie(0);

	int t; cin >> t; cin.ignore();
	while (t--) {
		solve();
	}

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3652kb

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