Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: jeeno987
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-10 18:18:00
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int cnt[26] = {0};
for (int i = 0; i < (int)s.size(); i++)
if (s[i] >= 'A' && s[i] <= 'Z') cnt[s[i] - 'A']++;
for (int c = 0; c < 26; c++)
if (cnt[c] == 1) { cout << char('A' + c) << '\n'; return 0; }
return 0;
}