标签:style color os io ar div 代码 sp amp
2992 1234 0
2992 is a Sky Number. 1234 is not a Sky Number.
代码:#include<stdio.h> int main() { int n; while(scanf("%d",&n),n) { int x,y=0,z=0,t; x=n%10+n/10%10+n/100%10+n/1000; t=n; while(t) { y+=t%16; t/=16; } if(y!=x) { printf("%d is not a Sky Number.\n",n); } else { t=n; while(t) { z+=t%12; t/=12; } if(x!=z) printf("%d is not a Sky Number.\n",n); else printf("%d is a Sky Number.\n",n); } } return 0; }
标签:style color os io ar div 代码 sp amp
原文地址:http://blog.csdn.net/qq_18062811/article/details/38929267