hdu acm 1007
#include <stdio.h>int main(){freopen("read.txt", "w", stdout);for(int j=0; j<=1000000000; j+=100){int tp = j;int seat = 1;int all = 0;while(tp){all += tp%10 * seat;seat *= 2;tp /=10;}printf("%d,", all);}return 0;}
附件列表
#include <stdio.h>int main(){freopen("read.txt", "w", stdout);for(int j=0; j<=1000000000; j+=100){int tp = j;int seat = 1;int all = 0;while(tp){all += tp%10 * seat;seat *= 2;tp /=10;}printf("%d,", all);}return 0;}