結果

問題 No.480 合計
ユーザー swyroak
提出日時 2021-07-25 22:09:40
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 35 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 39,168 KB
最終ジャッジ日時 2024-07-21 06:36:22
合計ジャッジ時間 1,960 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict";
function Main(input) {
    const inputToNumber = Number(input);
    const series = [...Array(inputToNumber).keys()].map(i => ++i);
    const amount = series.reduce((accum, current) => {
        return accum + current;
    }, 0);
    console.log(amount);
}
//テストの入力を受け取る
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//Main("5");
//# sourceMappingURL=index.js.map
0