Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: chokun

Problemset: ตัวอักษรตัวแรกในคำ

Language: cpp

Time: 0.005 second

Submitted On: 2026-10-06 15:51:30

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

int main() {
    string input_word;
    cin >> input_word;

    map<char, int> char_count;
    for (char c : input_word) {
        char_count[c]++;
    }

    char result = ' ';
    for (char c = 'A'; c <= 'Z'; c++) {
        if (char_count[c] == 1) {
            result = c;
            break;
        }
    }

    if (result != ' ') {
        cout << result << endl;
    }
}