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 KAYY at 2019-02-12 15:00:17 on Problem 1005
#include<stdio.h>
int main()
{
	int n,i,j,b[20];
	double a[20][2],r2,pi=3.1415;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%lf%lf",&a[i][0],&a[i][1]);
	
	
	for(i=0;i<n;i++)
	{
		r2=a[i][0]*a[i][0]+a[i][1]*a[i][1];
		for(j=0;;j++)
			if(j*50*2>pi*r2)
			{
				b[i]=j;break;
			}
		printf("Property %d: This property will begin eroding in year %d.\n",i+1,j);	
	}
	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