POJ-1005

来源:互联网 发布:手机淘宝怎样添加好友 编辑:程序博客网 时间:2024/06/05 16:02

来源:http://poj.org/problem?id=1005

怎么POJ前面的题都那么水= =

#include <iostream>#include <cstdio>#include <cmath>using namespace std;#define pi 3.1415926int main(){    int N;    cin>>N;    for (int Ncase=1;Ncase<=N;Ncase++)    {        double x,y;        cin>>x>>y;        double k=x*x+y*y;        double kk=k*pi/2;        int s=floor(kk/50.0)+1;        cout<<"Property "<<Ncase<<": This property will begin eroding in year "<<s<<"."<<endl;    }    cout<<"END OF OUTPUT."<<endl;    return 0;}
原创粉丝点击