elimini cea mai mare cifra
#include <iostream>
using namespace std;
int main()
{
unsigned long int N, N1, y=0,
short int cmax=-1, p=1;
cin >> N;
N1=N;
while (N!=0)
{
if (N%10>cmax) cmax=N%10;
N=N/10;
}
while (N1!=0)
{
if (N1%10!=cmax)
{
y=(N1%10)*p+y;
p=p*10;
}
N1=N1/10;
}
cout << y;
return 0;
}