• POJ 1005: I Think I Need a Houseboat


    #include <iostream>
    #include <cmath>
    using namespace std;    
    const double PI=3.141592654;
    int alu(double x, double y) {  
        double R2=x*x+y*y;  
        double S=PI*R2*0.5;  
        return (int)ceil(S/50.0);
    }
    int main() {  
        int N;
        cin>>N;  
        for(int i=1;i<=N;++i){
            double x,y;  
            cin>>x>>y;  
            int cnt=alu(x,y);  
            cout<<"Property "<<i<<": This property will begin eroding in year "<<cnt<<'.'<< endl;   
        }
        cout<<"END OF OUTPUT."<<endl;    
        return 0;  
    }  
    View Code
  • 相关阅读:
    linux----安装jdk
    docker安装gitlab
    Centos7 安装docker
    容易混淆的字符
    nodejs 简单从淘宝的有好货根据关键词获取列表以及详情
    bash设置终端提示符
    C# NuGet打包和离线安装
    Shell 遍历文件夹中所有文件并进行相关操作
    css中“~”和“>”
    双击编辑表格字段
  • 原文地址:https://www.cnblogs.com/Rhythm-/p/9336822.html
Copyright © 2020-2023  润新知