隨筆-28  評論-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 閱讀(1652) 評論(2)  編輯  收藏

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

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 西青区| 广丰县| 咸丰县| 阳春市| 新晃| 秀山| 保亭| 安远县| 剑川县| 嘉义市| 乡城县| 辛集市| 榆树市| 普兰县| 河东区| 乌海市| 杭锦旗| 孟连| 沙田区| 庆元县| 康平县| 朝阳市| 卢龙县| 铜川市| 册亨县| 龙门县| 泗洪县| 高雄县| 西峡县| 桐乡市| 贵德县| 郑州市| 迁安市| 灯塔市| 大足县| 泽普县| 农安县| 长宁区| 枞阳县| 遂昌县| 从江县|