/*
题意就是由那么一条半圆的湖,面积会以每年50平方英里的速度增大,然后给定一个坐标,求几年后会被淹没
然后稍微乱搞一下,答案就出来了。
*/

#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int main() { int i,n; double pi,x,y,years; cin>>n; pi=acos(-1);//这个是pi的最准确的表达方式 for(int i=0;i<n;i++) { cin>>x>>y; years=pi*(x*x+y*y)/100; printf("Property %d: This property will begin eroding in year %d.\n",i+1,(int)years+1); } printf("END OF OUTPUT.\n"); return 0; }

 

相关文章:

  • 2022-02-02
  • 2021-04-19
  • 2021-11-08
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
猜你喜欢
  • 2021-09-18
  • 2022-03-09
  • 2022-12-23
  • 2021-11-12
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案