F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                   ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                 ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                             ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                                       ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                                                          ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                                                                            ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                                                                                 ^
0_0_19858998_11926\Main.java:1: 错误: 需要class, interface或enum
importjava.util.*; publicclass Main {  publicstaticintgetpig(int n){ int pig1=1; int pig2=0; int s=1;  if(n==1) return s; else{  for(inti=2;i<=n;i++){                     pig2=pig1;             pig1=getpig(i-1); 
                                                                                                                                                                                                  ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
            ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                 ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                     ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                       ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                        ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                                           ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                                                                                                      ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                                                                                                                           ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                                                                                                                                                           ^
0_0_19858998_11926\Main.java:2: 错误: 需要class, interface或enum
            s=pig1+pig2;         } return s;         }      }  publicstaticvoid main(String args[]){ int k=0;          Scanner s=newScanner(System.in); int n=s.nextInt(); while(k<n){              Scanner s1=newScanner(System.in); int n2=s.nextInt();  System.out.println(getpig(n2)); k++;         }      } } 
                                                                                                                                                                                                                                                                                                        ^
19 个错误


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 00:18:54, Gzip enabled