#include <iostream>
using namespace std;
int cmmnr(int n)
{
unsigned v[10],ok=0,i,aux,j;
while (n!=0)
{
v[ok++]=n%10;
n=n/10;
}
for(i=1;i<=ok;i++)
for(j=i+1;j<ok;j++)
if(v[i]<v[j])
{
aux=v[i];
v[i]=v[j];
v[j]=aux;
}
n=0;
for(i=1;i<=ok;i++)
n=n*10+v[i];
return n;
}
int main()
{
int n;
cin>>n;
cout<<cmmnr(n);
}
Sa-mi spui numarul problemei sa verific daca problema ia maxim.