結果

問題 No.1903 Day1
ユーザー testtest
提出日時 2022-11-23 06:23:11
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 137 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 32 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 41,112 KB
最終ジャッジ日時 2023-10-24 18:40:51
合計ジャッジ時間 2,728 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
37,372 KB
testcase_01 AC 67 ms
37,372 KB
testcase_02 AC 137 ms
41,112 KB
testcase_03 AC 67 ms
37,420 KB
testcase_04 AC 67 ms
37,420 KB
testcase_05 AC 66 ms
37,420 KB
testcase_06 AC 67 ms
37,420 KB
testcase_07 AC 67 ms
37,420 KB
testcase_08 AC 69 ms
37,420 KB
testcase_09 AC 71 ms
41,080 KB
testcase_10 AC 70 ms
41,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function ans(n) {
    for (let i = 1; i <= 14000; i++) {
        if (i % 7 == 0) n += 6;
        n--;
        if (n == 0) return i;
    }
}
function Main(input) {
    const n = parseInt(input.replace("\n", ""));
    console.log(ans(n));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0