結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー f Ox
提出日時 2021-04-11 18:01:06
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 59,524 KB
最終ジャッジ日時 2024-06-27 12:41:50
合計ジャッジ時間 3,167 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  const data = input.split("\n");
  const N = data[0];
  const arrayNums = data[1].split(" ");
    
  let sum = BigInt(0);

  for (i=0; i<N; i++) {
    sum = BigInt(arrayNums[i]) + sum;
  }

  console.log(String(sum));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0