339A Beautiful Math


//bismillah
#include<iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
#include <algorithm>


int main()
{
    char s[100];
    cin>>s;
int  i=0,  ln=strlen(s);
  sort(s,s+ln);
  int count = 0;
   
    for(i=0;i<=ln-1;i++){
if(s[i]!='+')
   {cout<<s[i];
  if(i==ln-1)break; cout<<"+";}

   }
  
   



    return 0;

}

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

1535A. Fair Playoff

Aptitude test assistant programmer 2018