結果

問題 No.1893 Cycle
ユーザー testtest
提出日時 2022-11-23 05:08:35
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 37,520 KB
最終ジャッジ日時 2023-10-24 17:51:48
合計ジャッジ時間 4,553 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
37,520 KB
testcase_01 AC 67 ms
37,520 KB
testcase_02 AC 67 ms
37,520 KB
testcase_03 AC 67 ms
37,520 KB
testcase_04 AC 66 ms
37,520 KB
testcase_05 AC 66 ms
37,520 KB
testcase_06 AC 67 ms
37,520 KB
testcase_07 AC 66 ms
37,520 KB
testcase_08 AC 67 ms
37,520 KB
testcase_09 AC 68 ms
37,520 KB
testcase_10 AC 67 ms
37,520 KB
testcase_11 AC 67 ms
37,520 KB
testcase_12 AC 67 ms
37,520 KB
testcase_13 AC 67 ms
37,520 KB
testcase_14 AC 67 ms
37,520 KB
testcase_15 AC 66 ms
37,520 KB
testcase_16 AC 66 ms
37,520 KB
testcase_17 AC 67 ms
37,520 KB
testcase_18 AC 66 ms
37,520 KB
testcase_19 AC 66 ms
37,520 KB
testcase_20 AC 67 ms
37,520 KB
testcase_21 AC 66 ms
37,520 KB
testcase_22 AC 68 ms
37,520 KB
testcase_23 AC 67 ms
37,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
    let src = input.replace("\n", "").split(" ");
    let x = parseInt(src[0]);
    let y = parseInt(src[1]);
    const c = [
        [0, 4, 8],
        [1, 5, 9],
        [2, 6, 10],
        [3, 7, 11]
    ];
    let t = -1;
    for (let i = 0; i <= 3; i++) {
        if (c[i].includes(x)) {
            t = i;
            break;
        }
    }
    let ans = [...c[t]];
    ans = [...ans.filter(n => n != x && n != y)];
    console.log(ans[0]);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// 愚直
0