1 条题解

  • 1
    @ 2026-1-6 16:57:59
    #include <iostream>
    #include <string>
    #include <cctype>
    using namespace std;
    int main() {
        string input;
        getline(cin, input);
        string abbreviation;
        bool newWord = true;
        for (char c : input) {
            if (c == ' ') {
                newWord = true;
            } else if (newWord) {
                abbreviation += toupper(c); 
                newWord = false;
            }
        }
        cout << abbreviation << endl;
        
        return 0;
    }
    
    • 1

    信息

    ID
    101
    时间
    1000ms
    内存
    16MiB
    难度
    6
    标签
    (无)
    递交数
    708
    已通过
    205
    上传者