Codeforces-SolutionsA/Codes/339 A - Helpful Maths/339A.cpp

19 lines
311 B
C++
Raw Normal View History

2023-06-07 22:15:05 +08:00
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j,temp;
string s;
cin>>s;
for(i=0;i<s.length();i+=2)
{
for(j=i+2;j<s.length();j=j+2)
{
if(s[i]>s[j])
{
swap(s[i],s[j]);
}
}
}
cout<<s<<endl;
}