标签:style blog io color ar for sp div log
1 #include<cstdio> 2 using namespace std; 3 int n,m,res,a[101],en; 4 int main() 5 { 6 scanf("%d%d",&n,&m); 7 while(n) 8 { 9 a[++en]=n%m; 10 n/=m; 11 } 12 for(int i=en;i>0;i--) 13 { 14 if(a[i]<10) printf("%d",a[i]); 15 else putchar(a[i]-10+‘A‘); 16 } 17 puts(""); 18 return 0; 19 }
标签:style blog io color ar for sp div log
原文地址:http://www.cnblogs.com/autsky-jadek/p/4056353.html