Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

蒟蒻的AC纪念

Posted by CrystalBall at 2016-10-05 15:57:29 on Problem 1005
在这道题上无耻地搜了中文版——实在太难懂了!!!



#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator