Problem Description
Sky grew fond of strange things, and naturally sensitive to numbers, a chance, he found an interesting four-digit 2992, this number, its decimal number, its four-digit sum for 2+9+9+2=22, its hexadecimal number BB0, its four-digit sum is also 22, At the same time, its 12 binary number is 1894, and its four digits and 22, AHA, what a coincidence. Sky is very fond of this four-digit number because of his discovery, so here we name it as Sky number. But to judge such a number is still a little trouble ah, so now you help to determine the number of any decimal four digits, is not the sky number bar.
Input
The input contains some four-bit positive integers, and if 0, the input ends.
Output
If n is a sky number, the output "#n is a sky numbers.", otherwise the output "#n is not a sky digit.". Each result occupies one row. Note: #n表示所读入的n值.
Sample Input
2992
1234
0
Sample Output
2992 is a Sky number.
1234 is not a Sky number.
With the ToString method in the Java integer class, it is easy to convert a 10-binary number to the number of other systems.
Slowly experience the power of Java methods ...
Import Java.util.Scanner;
public class main{public static void Main (string[] args) {Scanner sc = new Scanner (system.in);
Char hex[] = {' A ', ' B ', ' C ', ' d ', ' e ', ' f '};
while (Sc.hasnext ()) {int n10 = Sc.nextint ();
if (n10==0) {return;
int a=0;
int b=0;
int c=0;
String Strn16 = integer.tostring (N10, 16);
String strn12 = integer.tostring (N10, 12);
int k=n10;
while (k!=0) {a=a+k%10;
K=K/10;
}//system.out.println (a);
Boolean isnum = true;
for (int i=0;i<strn16.length (); i++) {isnum = true;
for (int j=0;j