結果

問題 No.9010 うるう年判定
ユーザー ruase_ruase_
提出日時 2020-12-06 19:34:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 4,172 ms
コンパイル使用メモリ 73,984 KB
実行使用メモリ 57,676 KB
最終ジャッジ日時 2023-10-17 15:29:26
合計ジャッジ時間 8,020 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,388 KB
testcase_01 AC 132 ms
57,380 KB
testcase_02 AC 131 ms
57,412 KB
testcase_03 AC 131 ms
57,456 KB
testcase_04 AC 131 ms
57,368 KB
testcase_05 AC 130 ms
57,344 KB
testcase_06 AC 130 ms
57,480 KB
testcase_07 AC 127 ms
57,528 KB
testcase_08 AC 130 ms
57,420 KB
testcase_09 AC 129 ms
57,184 KB
testcase_10 AC 130 ms
57,676 KB
testcase_11 AC 126 ms
57,380 KB
testcase_12 AC 132 ms
57,556 KB
testcase_13 AC 129 ms
57,336 KB
testcase_14 AC 130 ms
57,368 KB
testcase_15 AC 128 ms
57,388 KB
testcase_16 AC 130 ms
57,408 KB
testcase_17 AC 129 ms
57,560 KB
testcase_18 AC 127 ms
57,404 KB
testcase_19 AC 126 ms
55,432 KB
testcase_20 AC 128 ms
57,488 KB
testcase_21 AC 129 ms
57,500 KB
testcase_22 AC 131 ms
57,312 KB
testcase_23 AC 130 ms
57,348 KB
testcase_24 AC 128 ms
57,464 KB
testcase_25 AC 128 ms
57,460 KB
testcase_26 AC 117 ms
56,312 KB
testcase_27 AC 128 ms
57,308 KB
testcase_28 AC 131 ms
57,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        if (N % 4 == 0) {
            if (N % 100 != 0) {
                System.out.print("Yes");
            } else if (N % 400 == 0) {
                System.out.print("Yes");
            } else {
                System.out.print("No");
            }

        }else{
            System.out.print("No");
        }


    }
}
0