ZJANS

c760. 蝸牛老師的點名單 (懶憜篇)

Easy Last Update: 2026/01/25
字串

給 n 個名字 s
將每個名字單獨輸出於一行
並將字首改成大寫


解法一

✅ 完整代碼

評分結果(參考) : AC (2ms, 336KB)

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

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

    string s;
    while(cin >> s){
        cout << (char)toupper(s[0]) << s.substr(1, s.size()) << "\n";
    }

    return 0;
}