結果

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

ソースコード

diff #

function Main(input) {
  const data = input.split("\n");
  const N = data[0];

    
  let sum = BigInt(0);

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

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