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 |
40题,庆祝下 发一个代码#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; while(n--) { string str; cin >> str; int result=0; for( int j=0;j<4;j++) { result = 0; for(int i=0;i!=8;i++) { result*=2; result+=(str[i+8*j]-'0'); } cout << result ; if(j!=3) cout << "."; } cout << endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator