mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1049.cpp
This commit is contained in:
parent
6b89ca4332
commit
dfc8d86b5f
22
ZOJ/1049.cpp
Normal file
22
ZOJ/1049.cpp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cmath>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int t;
|
||||||
|
double a,b;
|
||||||
|
scanf("%d",&t);
|
||||||
|
for(int i=0;i<t;i++)
|
||||||
|
{
|
||||||
|
scanf("%lf %lf",&a,&b);
|
||||||
|
double R=sqrt(a*a+b*b);
|
||||||
|
double S=3.14159*R*R/2;
|
||||||
|
int year=S/50+1;
|
||||||
|
printf("Property %d: This property will begin eroding in year %d.\n",i+1,year);
|
||||||
|
}
|
||||||
|
printf("END OF OUTPUT.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user