Codeforces刷题之路——339A Helpful Maths
来源:互联网 发布:单身生活 知乎 编辑:程序博客网 时间:2024/06/05 17:06
Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.
The teacher has written down the sum of multiple numbers. Pupils should calculate the sum. To make the calculation easier, the sum only contains numbers 1, 2 and 3. Still, that isn't enough for Xenia. She is only beginning to count, so she can calculate a sum only if the summands follow in non-decreasing order. For example, she can't calculate sum 1+3+2+1 but she can calculate sums 1+1+2 and 3+3.
You've got the sum that was written on the board. Rearrange the summans and print the sum in such a way that Xenia can calculate the sum.
The first line contains a non-empty string s — the sum Xenia needs to count. String s contains no spaces. It only contains digits and characters "+". Besides, string s is a correct sum of numbers 1, 2 and 3. String s is at most 100 characters long.
Print the new sum that Xenia can count.
3+2+1
1+2+3
1+1+3+1+3
1+1+1+3+3
2
2
- Codeforces刷题之路——339A Helpful Maths
- codeforces——339A——Helpful Maths
- CodeForces 339A Helpful Maths
- CodeForces-339A-Helpful Maths
- codeforces 339A Helpful Maths
- 【CodeForces】A. Helpful Maths
- Problem--339A--Codeforces-- A. Helpful Maths
- CodeForces 339 A.Helpful Maths(水~)
- 339A - Helpful Maths
- codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题
- CF 339A Helpful Maths
- Codeforces Helpful Maths
- A. Helpful Maths
- A. Helpful Maths
- codeforces 339A Helpful Maths(greedy implementation sortings strings水题)
- Codeforces Round #197 (Div. 2) A. Helpful Maths
- Codeforces Round #197 (Div. 2)A. Helpful Maths
- CF197#DIV2:A-Helpful Maths
- 美国国家安全局遭到黑客攻击
- 机器学习模型——SVM
- 使用Refresh ListView 实现Android下拉刷新
- PHP特级部分-学习记录
- httpd负载均衡服务器配置
- Codeforces刷题之路——339A Helpful Maths
- Scheme
- The environment variable JAVA_HOME(with the value of xxx) does not point to a valid JVM installation
- java发送http的get、post请求
- 今天我新注册了博客
- [LeetCode] 109. Convert Sorted List to Binary Search Tree
- py-faster-rcnn用自己的数据训练模型
- Git学习(二)
- 完成一个分析H264码流的工具