Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:大虾们帮忙,在ZOJAC的,为什么WAIn Reply To:大虾们帮忙,在ZOJAC的,为什么WA Posted by:sunmoonstar_love at 2005-06-11 22:58:11 如果你要那么做 需要 unsigned long long > #include <stdio.h> > int N,i; > unsigned a; > char tmp; > int main() > { > scanf("%d\n",&N); > while(N--) > { > a = 0; > for(i=31; i>=0; i--) > { > tmp = getchar(); > if(tmp == '1') > a += 1<<i; > } > tmp = getchar(); > printf("%d.%d.%d.%d\n",a>>24,(a>>16)%256,(a>>8)%256,a%256); > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator