Varianta 38 / Subiectul 3 / Problema 3 |
#include<iostream.h> void del( long &x, int y) { long r=0; while(x) { if(x%10<=y) r=r*10+x%10; x/=10; } if(r==0) x=-1; else while(r) { x=x*10+r%10; r/=10; } } void main() { long x;int y; cin>>x>>y; del(x,y); cout<<x; } |