http://acm.hdu.edu.cn/showproblem.php?pid=2051
#include<stdio.h>
int main(){
int n,a[30],i,j;
while(scanf("%d",&n) == 1){
i = 0;
while(n){
a[i++] = n%2;
n = n/2;
}
for(j = i-1;j >= 0;j--){
printf("%d",a[j]);
}
printf("\n");
}
return 0;
}