結果

問題 No.1713 trick or treat!
ユーザー testtest
提出日時 2022-11-22 12:47:44
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 5,240 KB
実行使用メモリ 37,448 KB
最終ジャッジ日時 2023-10-24 04:58:35
合計ジャッジ時間 4,182 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
37,272 KB
testcase_01 AC 71 ms
37,448 KB
testcase_02 AC 69 ms
37,448 KB
testcase_03 AC 69 ms
37,448 KB
testcase_04 AC 71 ms
37,448 KB
testcase_05 AC 71 ms
37,448 KB
testcase_06 AC 70 ms
37,448 KB
testcase_07 AC 70 ms
37,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function factorial(n) {
    if (n <= 1) {
        return 1;
    } else {
        return n * factorial(n - 1);
    }
}
function Main(input) {
    const src = input.replace("\n", "").split(" ");
    const a = parseInt(src[0]);
    const b = parseInt(src[1]);
    const c = a | b;
    console.log(factorial(c));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0