Submission
Status:
PP--------
Subtask/Task Score:
20/100
Score: 20
User: Mano
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-03 11:54:21
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int z=30;
bool b=true;
char a;
cin>>s;
if(s.length()>20){
cout<<"ERROR";
return 0;
}
for(int i=0;i<s.length()-1;i++){
a=s[i];
b=true;
for(int j=i+1;j<s.length();j++){
if(a==s[j]){
b=false;
break;
}
}
if(b==true){
z=i;
break;
}
}
if(z!=30){
cout<<s[z];
}
else{
cout<<"None";
}
return 0;
}