#include #include char *itoa( int val, char *a, int radix ) { char *p = a; unsigned int v = val; int n = 1; while(v >= radix){ v /= radix; n++; } p = a + n; v = val; *p = '\0'; do { --p; *p = v % radix + '0'; if(*p > '9') { *p = v % radix - 10 + 'A'; } v /= radix; } while ( p != a); return a; } int main(){ int N; int i; int max=0; char buf[10]; int len; int tmp; scanf("%d",&N); itoa(N,buf,10); len=strlen(buf); for(i=1;i