/* * this is the program which * convert NUM to STRING * * 0 ... 25 * A ... Z * * 26 ... 51 <-- INPUT * AA ... AZ <-- OUTPUT * * .. ... .. * * 676 ... 701 * ZA ... ZZ * * 702 ... * AAA ... */ #include #include void loop(long n) { if (n>25){ loop(n/26-1); printf("%c",'A'+n%26); }else printf("%c",'A'+n); } int main( ) { long n; scanf("%ld",&n); loop(n); printf("\n"); return 0; }