Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: mrblbb
Problemset: เรียงสตริง
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-13 21:08:41
#include <stdio.h>
#include <string.h>
int main(){
char str[40];
scanf("%s", str);
for (int i=1; i<strlen(str); i++){
for (int j=0; j<strlen(str)-i; j++){
if (str[j] > str[j+1]){
char temp = str[j];
str[j] = str[j+1];
str[j+1] = temp;
}
}
}
for (int i=0; i<strlen(str); i++){
if (str[i] != str[i+1]){
printf("%c ", str[i]);
}
}
}