POJ1005

作者: Shiki | 来源:发表于2014-08-21 16:04 被阅读0次

    问题描述###

    水是生命之源~


    难点###

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


    代码实现###

    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."); } }

    相关文章

      网友评论

          本文标题:POJ1005

          本文链接:https://www.haomeiwen.com/subject/yeaetttx.html