我是靠谱客的博主 默默丝袜,这篇文章主要介绍339A,现在分享给大家,希望可以做个参考。

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream> #include <string> #include <algorithm> using namespace std; #define maxSize 105 int main() { string exp; int digit[maxSize]; int length,index; while(cin>>exp) { length=exp.size(); index=0; for(int i=0; i<length; i+=2) digit[index++]=exp[i]-'0'; sort(digit,digit+index); cout<<digit[0]; if(index>1) { for(int i=1; i<index; ++i) cout<<'+'<<digit[i]; } cout<<endl; } return 0; }

  

转载于:https://www.cnblogs.com/ozxics/p/10656496.html

最后

以上就是默默丝袜最近收集整理的关于339A的全部内容,更多相关339A内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(93)

评论列表共有 0 条评论

立即
投稿
返回
顶部