Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:40题,庆祝下 发一个代码

Posted by DaXiaLiujingyao at 2008-10-03 16:57:05 on Problem 2105
In Reply To:40题,庆祝下 发一个代码 Posted by:bupt_chen at 2008-07-03 20:55:45
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator