結果

問題 No.9010 うるう年判定
ユーザー 🐧しゅんチャマ🌸🐧しゅんチャマ🌸
提出日時 2023-09-14 21:48:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 2,098 ms
コンパイル使用メモリ 71,540 KB
実行使用メモリ 56,420 KB
最終ジャッジ日時 2023-09-14 21:48:41
合計ジャッジ時間 7,643 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,812 KB
testcase_01 AC 126 ms
55,580 KB
testcase_02 AC 126 ms
56,308 KB
testcase_03 AC 131 ms
55,696 KB
testcase_04 AC 129 ms
56,420 KB
testcase_05 AC 131 ms
55,540 KB
testcase_06 AC 128 ms
55,576 KB
testcase_07 AC 128 ms
55,872 KB
testcase_08 AC 127 ms
55,932 KB
testcase_09 AC 127 ms
55,536 KB
testcase_10 AC 126 ms
56,148 KB
testcase_11 AC 126 ms
55,872 KB
testcase_12 AC 130 ms
55,872 KB
testcase_13 AC 127 ms
55,800 KB
testcase_14 AC 129 ms
55,972 KB
testcase_15 AC 127 ms
55,808 KB
testcase_16 AC 134 ms
55,808 KB
testcase_17 AC 129 ms
55,844 KB
testcase_18 AC 127 ms
55,780 KB
testcase_19 AC 130 ms
56,164 KB
testcase_20 AC 127 ms
55,824 KB
testcase_21 AC 128 ms
56,196 KB
testcase_22 AC 128 ms
55,944 KB
testcase_23 AC 129 ms
56,152 KB
testcase_24 AC 128 ms
55,796 KB
testcase_25 AC 135 ms
55,844 KB
testcase_26 AC 129 ms
56,060 KB
testcase_27 AC 128 ms
55,940 KB
testcase_28 AC 127 ms
55,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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