結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー intercept6intercept6
提出日時 2020-07-09 15:25:12
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 230 ms / 3,000 ms
コード長 568 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 59,736 KB
最終ジャッジ日時 2024-04-16 11:36:07
合計ジャッジ時間 3,748 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
39,168 KB
testcase_01 AC 64 ms
39,168 KB
testcase_02 AC 68 ms
39,296 KB
testcase_03 AC 64 ms
39,424 KB
testcase_04 AC 65 ms
39,168 KB
testcase_05 AC 65 ms
39,168 KB
testcase_06 AC 65 ms
39,168 KB
testcase_07 AC 74 ms
41,088 KB
testcase_08 AC 106 ms
51,176 KB
testcase_09 AC 143 ms
56,048 KB
testcase_10 AC 217 ms
54,564 KB
testcase_11 AC 221 ms
58,556 KB
testcase_12 AC 230 ms
58,828 KB
testcase_13 AC 229 ms
58,856 KB
testcase_14 AC 198 ms
54,912 KB
testcase_15 AC 203 ms
55,060 KB
testcase_16 AC 218 ms
59,736 KB
testcase_17 AC 63 ms
39,424 KB
testcase_18 AC 64 ms
39,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// https://yukicoder.me/problems/no/9009

function Main(input) {
  // inputにはすべての入力の文字列が与えられるので必要に応じて input.split("\n") などで分割する。

  const data = input.split('\n')

  const first_line = data[0].split(' ')
  const second_line = data[1]

  const array = second_line.split(' ')

  const num = Number(first_line)

  let res = 0n
  for (i = 0; i < num; i++) {
    res += BigInt(data[i + 1])
  }

  console.log(String(res))
}

// Don't edit this line!
Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
0