Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: asdasd
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-12 15:23:43
#include <stdio.h>
#include <string.h>
int main(){
char word[20];
scanf("%s",word);
int len = strlen(word);
for(int i = 0 ; i<len-1 ; i++){
for(int j = 0 ; j<len-i-1 ; j++){
if(word[j]>word[j+1]){
char temp = word[j];
word[j]=word[j+1];
word[j+1]=temp;
}
}
}
for(int i = 0 ; i<len ; i++){
if(word[i]!=word[i+1]){
if(word[i]!=word[i-1]){
printf("%c",word[i]);
break;
}
}
}
}