文章

32

粉丝

81

获赞

5

访问

16.1k

头像
字符串排序 题解:
P1254 北京大学机试题
发布于2023年8月23日 16:50
阅读数 536

#include<bits/stdc++.h>
using namespace std;

int main(){
char s[20];
while(scanf("%s",s)!=EOF){
int n=strlen(s);
sort(s,s+n);
for(int i=0;i<strlen(s);i++){
    printf("%c",s[i]);}
}
return 0;
}
 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发