QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#49656#4413. Cyber LanguagelqhsmashAC ✓3ms3756kbC++11769b2022-09-22 10:51:142022-09-22 10:51:15

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-22 10:51:15]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3756kb
  • [2022-09-22 10:51:14]
  • 提交

answer

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

const int N = 2e5 + 50;

char s[N];

int main() {
#ifdef LOCAL
    clock_t c1 = clock();
    freopen("in.in", "r", stdin);
    freopen("out.out", "w", stdout);
#endif
    // ===================================================    
    int T;
    scanf ("%d", &T);
    getchar ();
    while (T --) {
        gets (s);
        printf("%c", *s - 'a' + 'A');
        for (int i = 1; s[i]; i ++) {
            if (s[i - 1] == ' ') 
                printf("%c", s[i] - 'a' + 'A');
        }
        printf("\n");
    }
    // ===================================================    
#ifdef LOCAL
    cerr << "Time Used: " << clock() - c1 << "ms" << endl;
#endif
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3756kb

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