結果

問題 No.9010 うるう年判定
ユーザー testtest
提出日時 2022-11-14 20:48:09
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 5,172 KB
実行使用メモリ 42,220 KB
最終ジャッジ日時 2023-10-14 03:49:41
合計ジャッジ時間 5,166 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
41,892 KB
testcase_01 AC 78 ms
41,968 KB
testcase_02 AC 81 ms
42,128 KB
testcase_03 AC 78 ms
41,928 KB
testcase_04 AC 79 ms
42,008 KB
testcase_05 AC 78 ms
42,032 KB
testcase_06 AC 77 ms
41,992 KB
testcase_07 AC 77 ms
42,000 KB
testcase_08 AC 78 ms
42,080 KB
testcase_09 AC 78 ms
42,092 KB
testcase_10 AC 77 ms
41,936 KB
testcase_11 AC 80 ms
41,864 KB
testcase_12 AC 79 ms
41,996 KB
testcase_13 AC 77 ms
41,996 KB
testcase_14 AC 76 ms
42,092 KB
testcase_15 AC 77 ms
42,004 KB
testcase_16 AC 77 ms
41,872 KB
testcase_17 AC 77 ms
42,088 KB
testcase_18 AC 78 ms
42,004 KB
testcase_19 AC 77 ms
41,876 KB
testcase_20 AC 77 ms
41,868 KB
testcase_21 AC 80 ms
42,220 KB
testcase_22 AC 76 ms
41,992 KB
testcase_23 AC 77 ms
41,856 KB
testcase_24 AC 77 ms
42,036 KB
testcase_25 AC 77 ms
42,080 KB
testcase_26 AC 77 ms
41,872 KB
testcase_27 AC 77 ms
41,968 KB
testcase_28 AC 76 ms
41,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function isLeapYear(y) {
    if (y % 400 == 0) return true;
    if (y % 4 == 0) {
        if (y % 100 == 0) return false;
        return true;
    }
    return false;
}
function Main(input) {
    let N = parseInt(input.replace("\n", ""));
    console.log(isLeapYear(N) ? "Yes" : "No");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0