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:很想知道那些0KB是怎么做到的,求高手代码

Posted by spb3732 at 2012-12-07 14:56:05 on Problem 1005
In Reply To:很想知道那些0KB是怎么做到的,求高手代码 Posted by:sukiida at 2012-10-23 16:15:08
#include <iostream>
using namespace std;
#define PI 3.1415926
int main()
{
   int times=0;
   cin>>times;
   double XPos=0;
   double YPos=0;
   int index=0;
   while(index++<times)
   {
      cin>>XPos>>YPos;
      double Years=(XPos*XPos+YPos*YPos)*PI/50;
      int ret=(int)Years;
      if(Years-ret>1e-6)
         ret=ret+1;
      cout<<"Property "<<index<<": This property will begin eroding in year "<<ret<<"."<<endl; 
      
    }
   cout<<"END OF OUTPUT."<<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