結果

問題 No.9010 うるう年判定
ユーザー silverskyvictosilverskyvicto
提出日時 2018-06-10 22:15:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 591 bytes
コンパイル時間 3,388 ms
コンパイル使用メモリ 73,284 KB
実行使用メモリ 56,216 KB
最終ジャッジ日時 2023-09-04 01:07:37
合計ジャッジ時間 8,396 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,992 KB
testcase_01 AC 127 ms
55,784 KB
testcase_02 AC 125 ms
55,544 KB
testcase_03 AC 126 ms
55,944 KB
testcase_04 AC 125 ms
55,448 KB
testcase_05 AC 126 ms
55,956 KB
testcase_06 AC 127 ms
55,812 KB
testcase_07 AC 128 ms
55,860 KB
testcase_08 AC 127 ms
55,896 KB
testcase_09 AC 127 ms
55,704 KB
testcase_10 AC 125 ms
55,780 KB
testcase_11 AC 128 ms
55,852 KB
testcase_12 AC 128 ms
55,828 KB
testcase_13 AC 128 ms
55,940 KB
testcase_14 AC 126 ms
55,760 KB
testcase_15 AC 126 ms
55,832 KB
testcase_16 AC 127 ms
55,704 KB
testcase_17 AC 125 ms
55,520 KB
testcase_18 AC 127 ms
55,912 KB
testcase_19 AC 127 ms
55,700 KB
testcase_20 AC 126 ms
55,688 KB
testcase_21 AC 126 ms
55,548 KB
testcase_22 AC 127 ms
56,048 KB
testcase_23 AC 127 ms
55,960 KB
testcase_24 AC 129 ms
55,820 KB
testcase_25 AC 127 ms
55,652 KB
testcase_26 AC 126 ms
55,912 KB
testcase_27 AC 127 ms
55,896 KB
testcase_28 AC 125 ms
56,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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