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

求助!!java 结果正确 怎么是wa

Posted by xoliuxiao at 2010-01-30 20:10:31 on Problem 1005
import java.util.Scanner;
public class Main {
	
     public static void main(String[] args) {
    	  
		
		Scanner getNumber = new Scanner(System.in);
		float n = getNumber.nextFloat();
		
			
            for(int i=1;i<=n;i++){
			int year=0;
			float x=getNumber.nextFloat();
			float y=getNumber.nextFloat();
			for(;3.14*((x*x)+(y*y))>(100*year);year++){
				
			}
			System.out.println("property"+" "+i+":"+"This property will begin eroding in year "+year+".");
		}
		System.out.println("END OF OUTPUT.");
	}

}

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