| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
蒟蒻的AC纪念在这道题上无耻地搜了中文版——实在太难懂了!!!
#include <cstdio>
#include <iostream>
#include <ctype.h>
using namespace std;
const int STEP = 50;
const float PI = 3.141592;
int Semi(float x, float y)
{
return (int)(PI * (x * x + y * y))/2;
}
int main()
{
int n;
int i;
scanf("%d",&n);
for (i = 1;i <= n;i++)
{
float x,y;
int area;
scanf("%f%f",&x,&y);
area = Semi(x,y);
printf("Property %d: This property will begin eroding in year %d.\n",i,area/STEP + 1);
}
printf("END OF OUTPUT.");
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator