QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#42675#4413. Cyber Language01shijian#AC ✓1ms3728kbC++17632b2022-08-03 14:27:522022-08-03 14:27:53

Judging History

This is the latest submission verdict.

  • [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]
  • Judged
  • Verdict: AC
  • Time: 1ms
  • Memory: 3728kb
  • [2022-08-03 14:27:52]
  • Submitted

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;
}

Details

Tip: Click on the bar to expand more detailed information

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