結果

問題 No.9010 うるう年判定
ユーザー ウップス600ウップス600
提出日時 2022-01-04 20:56:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 2,438 ms
コンパイル使用メモリ 74,788 KB
実行使用メモリ 41,436 KB
最終ジャッジ日時 2024-04-22 17:52:50
合計ジャッジ時間 7,504 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
39,888 KB
testcase_01 AC 127 ms
41,132 KB
testcase_02 AC 128 ms
41,252 KB
testcase_03 AC 114 ms
40,072 KB
testcase_04 AC 127 ms
41,200 KB
testcase_05 AC 114 ms
40,024 KB
testcase_06 AC 114 ms
39,872 KB
testcase_07 AC 113 ms
40,124 KB
testcase_08 AC 115 ms
40,144 KB
testcase_09 AC 125 ms
41,436 KB
testcase_10 AC 128 ms
40,932 KB
testcase_11 AC 125 ms
41,328 KB
testcase_12 AC 126 ms
41,016 KB
testcase_13 AC 125 ms
41,384 KB
testcase_14 AC 127 ms
40,992 KB
testcase_15 AC 114 ms
39,916 KB
testcase_16 AC 114 ms
40,100 KB
testcase_17 AC 114 ms
40,036 KB
testcase_18 AC 112 ms
39,880 KB
testcase_19 AC 125 ms
40,972 KB
testcase_20 AC 114 ms
39,956 KB
testcase_21 AC 127 ms
41,044 KB
testcase_22 AC 126 ms
41,292 KB
testcase_23 AC 114 ms
40,032 KB
testcase_24 AC 118 ms
40,628 KB
testcase_25 AC 125 ms
41,040 KB
testcase_26 AC 123 ms
40,864 KB
testcase_27 AC 128 ms
41,028 KB
testcase_28 AC 131 ms
41,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java. util. Scanner;

public class Main{
	public static void main (String[] args){
		Scanner scanner = new Scanner (System. in);
		int year = scanner. nextInt();
		
		if (year % 100 == 0 && year % 400 != 0){
			System. out. println ("No");
		}else if (year % 4 == 0){
			System. out. println ("Yes");
		}else{
			System. out. println ("No");
		}
	}
}
0