i think i need a houseboat.txt

来自「以前ACM在哈工程HRBEU做的一些简单题目」· 文本 代码 · 共 20 行

TXT
20
字号
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    const double pi=3.1415;
    double x,y,s;
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
      cin>>x>>y;
      s=0;
      while(sqrt(x*x+y*y)>sqrt((s+50)*2/pi))s+=50;
      cout<<"Property "<<i<<": This property will begin eroding in year "<<s/50+1<<"."<<endl;
    }
    cout<<"END OF OUTPUT."<<endl;
    return 0;  
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?