POJ1005

2014-08-21  本文已影响0人  Shiki

问题描述###

水是生命之源~


难点###

难度在于读懂题,英语差伤不起~


代码实现###

package poj; import java.util.Scanner; public class Poj1005 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int len = sc.nextInt(); int c = 1; while(c <= len){ double x=sc.nextDouble(); double y=sc.nextDouble(); double area=Math.PI*(x*x+y*y); int ans=0; double sum=0; while(sum<area){ ans++; sum+=100; } System.out.println("Property "+c+": This property will begin eroding in year "+ans+"."); c++; } sc.close(); System.out.println("END OF OUTPUT."); } }

上一篇下一篇

猜你喜欢

热点阅读