#7591: 誰可以救救我


ajhe1121 (哲哲)


我的程式碼一直錯誤

可是我用我電腦執行都是對的阿

哭哭 

以下是我的程式碼

import java.io.*;

 

public class Years{

public static void main(String [] argv)

throws IOException{

BufferedReader br = new

BufferedReader (new InputStreamReader (System.in));

int y;

System.out.println("年份 :");

String str = br.readLine();

y = Integer.parseInt(str);

if ((y%4==0)&(y%100!=0)){

System.out.println("閏年");

}

else if (y%400==0){

System.out.println("閏年");

}

else{

System.out.println("平年");

}

 

}

#7592: Re:誰可以救救我


ajhe1121 (哲哲)


他都一直出現WA (line:1)

我不知道要怎麼辦 

#7593: Re:誰可以救救我


passerr (20130326 0340 48)


輸出說明 :
閏年 或 平年
 
所以不要輸出多餘的東西,例如: "年份 :"