結果

問題 No.2789 hako111223’s Master Thesis
コンテスト
ユーザー YU Hirose
提出日時 2024-07-22 21:18:35
言語 JavaScript
(node v26.11.1 + ACL)
コンパイル:
true
実行:
node _filename_ ONLINE_JUDGE
結果
AC  
実行時間 39 ms / 2,000 ms
+ 146µs
コード長 315 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3 ms
コンパイル使用メモリ 7,724 KB
実行使用メモリ 50,544 KB
最終ジャッジ日時 2026-08-23 13:34:11
合計ジャッジ時間 4,417 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

function Main(input) {
    input = input.trim().split("\n");
    const [a, b, c, d] = input[0].trim().split(" ").map(Number);
    let p = 31 - a + b;
    let res;
    if (p >= c) res = 1;
    else if (p >= d) res = 2;
    else res = 3;
    console.log(res);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0