結果

問題 No.9010 うるう年判定
ユーザー きつねうどんきつねうどん
提出日時 2024-03-13 18:46:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 3,877 ms
コンパイル使用メモリ 74,916 KB
実行使用メモリ 58,096 KB
最終ジャッジ日時 2024-03-13 18:46:34
合計ジャッジ時間 8,907 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
57,556 KB
testcase_01 AC 152 ms
57,528 KB
testcase_02 AC 143 ms
57,676 KB
testcase_03 AC 141 ms
58,096 KB
testcase_04 AC 142 ms
58,056 KB
testcase_05 AC 144 ms
57,548 KB
testcase_06 AC 143 ms
58,024 KB
testcase_07 AC 147 ms
57,616 KB
testcase_08 AC 150 ms
58,056 KB
testcase_09 AC 143 ms
57,568 KB
testcase_10 AC 144 ms
58,076 KB
testcase_11 AC 144 ms
57,644 KB
testcase_12 AC 143 ms
58,036 KB
testcase_13 AC 142 ms
57,576 KB
testcase_14 AC 144 ms
57,560 KB
testcase_15 AC 142 ms
57,720 KB
testcase_16 AC 149 ms
57,548 KB
testcase_17 AC 147 ms
58,032 KB
testcase_18 AC 141 ms
57,568 KB
testcase_19 AC 141 ms
57,672 KB
testcase_20 AC 145 ms
57,536 KB
testcase_21 AC 140 ms
57,532 KB
testcase_22 AC 142 ms
57,552 KB
testcase_23 AC 151 ms
57,800 KB
testcase_24 AC 143 ms
57,668 KB
testcase_25 AC 142 ms
55,692 KB
testcase_26 AC 141 ms
58,068 KB
testcase_27 AC 141 ms
57,564 KB
testcase_28 AC 141 ms
57,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        if (N % 100 == 0 && N % 400 != 0) {
            System.out.println("No");
        } else if (N % 4 == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

0