結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
![]() |
提出日時 | 2021-02-02 22:47:53 |
言語 | JavaScript (node v23.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 255 bytes |
コンパイル時間 | 41 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 52,824 KB |
最終ジャッジ日時 | 2024-06-29 23:55:51 |
合計ジャッジ時間 | 3,343 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 15 |
ソースコード
const input = require('fs').readFileSync('/dev/stdin', 'utf8'); const arr1 = input.split('\n'); const arr2 = arr1[1].split(' '); let N = parseInt(arr1[0]); let sum = 0; for(let i = 1; i <= N; i++) { sum = sum + parseInt(arr2[i]); } console.log(sum);