题解 | #图片整理#

图片整理

https://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941

#include <iostream>
using namespace std;

int main() {
    string str;
    getline(cin,str);
    for(int i=0;i<str.size();i++){
        for(int j=i+1;j<str.size();j++){
            if(int(str[i])>int(str[j])){
                char c=str[i];
                str[i]=str[j];
                str[j]=c;
            }
        }
        
    }
    cout<<str;

}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

Aurora23:属于挂一半,暂时进池子了,隔一段时间没有其他组捞的话就彻底结束了
点赞 评论 收藏
分享
纯真的河老师在喝茶:第一个是这个时间点岗位少,第二个是这个简历重复度太高了,10个有9个简历差不多的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务