#45451: 下面那個人的答案很爛 看我的


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)

學校 : 臺北市立建國高級中學
編號 : 266561
來源 : [60.248.154.139]
最後登入時間 :
2025-05-14 12:52:11
a782. 4. Redundant Acronym Syndrome Syndrome -- HP CodeWars2008 | From: [60.248.154.143] | 發表日期 : 2025-03-05 15:50

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

int main() {
    string s;
    while (getline(cin, s) && s != "END") {
        stringstream ss(s);
        string word;
        while(ss >> word){
            cout << char(toupper(word[0]));
        }
        cout << ' ' << word << endl;
    }
    return 0;
}

 
#45454: Re: 下面那個人的答案很爛 看我的


1121226@stu.wghs.tp.edu.tw (Arthur✨EC✨小蜜楓)

學校 : 臺北市私立薇閣高級中學
編號 : 252772
來源 : [60.248.154.139]
最後登入時間 :
2025-05-14 12:52:05
a782. 4. Redundant Acronym Syndrome Syndrome -- HP CodeWars2008 | From: [60.248.154.143] | 發表日期 : 2025-03-05 15:51

#include
using namespace std;

int main() {
    string s;
    while (getline(cin, s) && s != "END") {
        stringstream ss(s);
        string word;
        while(ss >> word){
            cout << char(toupper(word[0]));
        }
        cout << ' ' << word << endl;
    }
    return 0;
}

我無言

 
ZeroJudge Forum