Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: sulinx
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-21 12:45:35
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
string str;
cin >> str;
int count = 0;
for(int i = 0;i<26;i++){
for(int j = 0;j<str.length();j++){
if(str[j] == 'A' + i){
count++;
}
}
if(count!=1){
count = 0;
}else if(count == 1){
cout << char('A' + i);
return 0;
}
}
}