結果
問題 | No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用) |
ユーザー | intercept6 |
提出日時 | 2020-07-09 15:12:10 |
言語 | JavaScript (node v21.7.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 42 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 51,420 KB |
最終ジャッジ日時 | 2024-04-16 10:56:46 |
合計ジャッジ時間 | 3,023 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 65 ms
38,912 KB |
testcase_01 | AC | 64 ms
38,784 KB |
testcase_02 | AC | 63 ms
39,040 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 111 ms
48,004 KB |
testcase_10 | AC | 123 ms
50,068 KB |
testcase_11 | AC | 124 ms
49,960 KB |
testcase_12 | AC | 125 ms
50,236 KB |
testcase_13 | AC | 128 ms
50,252 KB |
testcase_14 | AC | 129 ms
50,272 KB |
testcase_15 | AC | 131 ms
50,420 KB |
testcase_16 | AC | 137 ms
51,420 KB |
testcase_17 | AC | 64 ms
38,784 KB |
testcase_18 | WA | - |
ソースコード
// https://yukicoder.me/problems/no/9008 function Main(input) { // inputにはすべての入力の文字列が与えられるので必要に応じて input.split("\n") などで分割する。 const data = input.split('\n') const second_line = data[1] const array = second_line.split(' ') const reducer = (accumulator, currentValue) => { return Number(accumulator) + Number(currentValue) } console.log(array.reduce(reducer)) } // Don't edit this line! Main(require('fs').readFileSync('/dev/stdin', 'utf8'))