标签:number for ali sample problems NPU style eof scan
#include<stdio.h> int main() { int n=0; int l=0; char s[20]; while(scanf("%d",&n)!=EOF) { l=0; while(n!=0) { s[l++]=n%2; n/=2; } for(int i=l-1;i>=0;i--) printf("%d",s[i]); printf("\n"); } }
标签:number for ali sample problems NPU style eof scan
原文地址:https://www.cnblogs.com/wzmm/p/12670467.html