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 |
请高手帮忙看看;例子能通过但递交时就wrong answer了??????????????????有代码。#include<iostream> #include<math.h> int main() { using namespace std; int ip[4]; int n; int i,j; cin>>n; for(;n>0;n--) { getchar(); for(i=0;i<4;i++) { ip[i]=0; for(j=0;j<8;j++) ip[i]+=(getchar()-'0')*pow(2,(7-j)); } getchar(); cout<<ip[0]<<"."<<ip[1]<<"."<<ip[2]<<"."<<ip[3]<<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