結果
問題 |
No.9010 うるう年判定
|
ユーザー |
|
提出日時 | 2022-11-14 20:48:09 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 39,168 KB |
最終ジャッジ日時 | 2024-09-15 23:19:47 |
合計ジャッジ時間 | 3,479 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
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"));