結果

問題 No.1903 Day1
ユーザー test
提出日時 2022-11-23 06:23:11
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 203 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 44,652 KB
最終ジャッジ日時 2024-09-24 11:52:39
合計ジャッジ時間 2,732 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

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