Submission

Status:
PPPPPPPPPP

Score: 100

User: Nathlol2

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-01-21 11:38:41

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

int32_t main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
    
    string s;
    cin >> s;
    map<char, int> mp;
    for(auto i : s){
        mp[i]++;
    }
    for(char i = 'A';i<='Z';i++){
        if(mp.find(i) != mp.end()){
            if(mp[i] > 1){
                continue;
            }else{
                cout << i;
                exit(0);
            }
        }
    }
}