Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Folk_DIWA

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-12 23:42:10

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

using ll = long long;

int main(){
    cin.tie(0)->sync_with_stdio(0);

    string s; cin >> s;
    unordered_map <char,int> freq;

    for(int i=0; i<s.size(); i++){
        freq[s[i]]++;
    }

    for(int i=0; i<26; i++){
        if(freq.count(char('A' + i))){

            if(freq[char('A' + i)] == 1){
                cout << char('A' + i);
                return 0;

            }

        }
    }

    return 0;
}