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:很想知道那些0KB是怎么做到的,求高手代码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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator