隨筆-28  評(píng)論-51  文章-10  trackbacks-0
          //http://acm.pku.edu.cn/JudgeOnline/
          package
           com.pku;
          import java.io.*;
          import java.util.*;
          import java.lang.Math;

          public class Pku1005 {

                  
          /**
                   * 
          @param args
                   
          */
                  
          double semisquare(double x, double y)
                  {
                      
          double length = Math.sqrt(x*+ y*y);
                      
          return Math.PI * length *length/2;
                  }
                  
          public static void main(String[] args) {
                      
          // TODO Auto-generated method stub
                      Scanner cin = new Scanner(new BufferedInputStream(System.in));
                      Pku1005 pku1005 
          = new Pku1005();
                      
          int n = cin.nextInt();
                      
          double x = 0, y = 0;
                      
          double square = 0.0;
                      
          double temp = 0.0;
                      
          int i = 1;    
                      
          while(i <= n)
                      {
                          x 
          = cin.nextDouble();
                          y 
          = cin.nextDouble();
                          square 
          = pku1005.semisquare(x, y);
                          System.out.println(
          "Property "+ i +": This property will begin eroding in year "+ (int)(square/50+1+".");
                          i
          ++;                    
                      }
                      System.out.println(
          "END OF OUTPUT.");
                  }

          }


          posted on 2007-10-28 17:21 fullfocus 閱讀(1648) 評(píng)論(2)  編輯  收藏

          評(píng)論:
          # re: PKU1005---北大ACM online judge 2007-12-31 10:48 | koky
          為什么你這個(gè)代碼在pku上提交后說是CompileError啊?  回復(fù)  更多評(píng)論
            
          # re: PKU1005---北大ACM online judge[未登錄] 2011-07-21 15:27 | xyz
          語言是c++么@koky
            回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 平遥县| 宁武县| 靖安县| 桓台县| 静安区| 诸城市| 耒阳市| 湘潭县| 始兴县| 湖南省| 科尔| 阿坝县| 新邵县| 开封市| 介休市| 周至县| 安陆市| 沁水县| 彭州市| 彰武县| 双柏县| 友谊县| 江川县| 宁蒗| 东宁县| 华安县| 清新县| 习水县| 乌鲁木齐县| 武胜县| 宜良县| 中江县| 广宁县| 连城县| 梅州市| 富锦市| 葫芦岛市| 英吉沙县| 武威市| 遂平县| 龙海市|