#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;
}

  

339A的更多相关文章

  1. [ An Ac a Day ^_^ ] CodeForces 339A Helpful Maths

    熄灯了才想起来没写博客 赶紧水一道题碎觉…… #include<stdio.h> #include<iostream> #include<algorithm> #i ...

  2. codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题

    A.题意就是把字符串里面的数字按增序排列,直接上代码. #include <string.h> #include <stdio.h> #include <algorith ...

  3. MVC4 WebAPI

    不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提供REST风格的WebService,个人比较喜欢REST风格的WebService,感觉比SOAP要轻量级一些,而且对客户端的要 ...

  4. MVC4 WebAPI(一)

    http://www.cnblogs.com/wk1234/archive/2012/04/28/2468491.html 不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提供RE ...

  5. OAF_OAF控件系列3 - AdvancedTable的实现(案例)

    2014-06-02 Created By BaoXinjian

  6. MVC4 WebAPI(一)(转)

    出处:http://www.cnblogs.com/wk1234/archive/2012/04/28/2468491.html 不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提 ...

随机推荐

  1. 10.16 正式开发stark组件(一)

    2018-10-16 17:26:44 Django MTV  路由配置里面有 反向解析 参考连接:https://www.cnblogs.com/yuanchenqi/articles/762993 ...

  2. java内存溢出总结(1.8)

    堆溢出 原因:老年代没有足够的空间存放即将进入老年代对象(或者没有连续的空间存下某个大对象),1.多次gc没有回收的对象 2. ygc后,s区满了,多余的对象直接进入老年代,3.大对象直接进入老年代 ...

  3. python 中的 print 函数与 list函数

    print()  函数: 传入单个参数时默认回车换行,关键词 end 可以用来避免输出后的回车(换行), 或者以一个不同的字符串结束输出. >>> a, b = 0, 1 >& ...

  4. VBS数组导出到Excel

    <script language="vbscript"> dim arr(9999,4) for i=0 to 9999 for j = 0 to 4 arr(i,j) ...

  5. [No0000157].net core项目中拼音,excel,pdf处理库

    汉字转拼音 1. HxfPinYin public static class Pinyin { public static string ConvertEncoding(string text, En ...

  6. [No0000128]SQL纵表与横表互转

    1.纵表转横表: 纵表结构:Table1 转换后的横表结构: Sql示例代码: select username, sum(case Course when '语文' then Grade else 0 ...

  7. kafka读书笔记《kafka权威指南》2018

    1.有了分区,可以多个client消费一个topic,有了分区,可以将一个topic 分散在多个broker 2.kafka通过复制实现可靠,通过横向扩展提高性能(如增加分区.客户端.增加broker ...

  8. 下载JDK和Jmeter并设置系统环境变量

    一.JDK下载并设置系统环境变量 1.JDK官网下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html 点左边的 ...

  9. 存储过程收集统计信息ORA-20000报错解决记录

    存储过程如下: create or replace procedure ad.table_analyse_bill( p_BillMonth in number,--bill_month p_tail ...

  10. ini文件读写

    //创建对象:iniFile:=TIniFile.Create(strFile); //写入procedure IEAddFavUrl(FURL, Title: string);var  fPath: ...