結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー f Oxf Ox
提出日時 2021-04-11 18:01:06
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 247 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 60,132 KB
最終ジャッジ日時 2023-09-09 20:07:32
合計ジャッジ時間 3,955 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
42,352 KB
testcase_01 AC 76 ms
42,172 KB
testcase_02 AC 74 ms
42,172 KB
testcase_03 AC 74 ms
42,416 KB
testcase_04 AC 75 ms
42,176 KB
testcase_05 AC 77 ms
44,156 KB
testcase_06 AC 78 ms
42,348 KB
testcase_07 AC 88 ms
44,052 KB
testcase_08 AC 126 ms
53,172 KB
testcase_09 AC 160 ms
58,396 KB
testcase_10 AC 214 ms
54,844 KB
testcase_11 AC 217 ms
55,404 KB
testcase_12 AC 231 ms
59,120 KB
testcase_13 AC 232 ms
59,212 KB
testcase_14 AC 237 ms
59,376 KB
testcase_15 AC 235 ms
59,652 KB
testcase_16 AC 247 ms
60,132 KB
testcase_17 AC 76 ms
42,268 KB
testcase_18 AC 76 ms
42,448 KB
権限があれば一括ダウンロードができます

ソースコード

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