Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: asdasd
Problemset: เรียงสตริง
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-10 22:26:36
#include <stdio.h>
#include <string.h>
int main(){
char word[30];
scanf("%s" ,word);
int len = strlen(word);
char temp;
for(int i = 0 ; i<len-1 ; i++){
for(int j = 0 ; j<len-i-1 ; j++){
if(word[j]>word[j+1]){
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]){
continue;
}
printf("%c ",word[i]);
}
}