結果
| 問題 | No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用) |
| ユーザー |
|
| 提出日時 | 2020-07-16 09:47:59 |
| 言語 | TypeScript(Node) (7.0.2 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 137 ms / 2,000 ms |
| + 100µs | |
| コード長 | 491 bytes |
| 記録 | |
| コンパイル時間 | 914 ms |
| コンパイル使用メモリ | 191,412 KB |
| 実行使用メモリ | 74,916 KB |
| 最終ジャッジ日時 | 2026-10-09 23:54:07 |
| 合計ジャッジ時間 | 4,165 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 |
ソースコード
import { readFileSync } from 'fs';
function Main(input: string) {
// inputにはすべての入力の文字列が与えられるので必要に応じて input.split("\n") などで分割する。
const data = input.split('\n');
const array = data[1].split(' ');
const reducer = (accumulator: string, currentValue: string) => {
return String(BigInt(accumulator) + BigInt(currentValue));
};
console.log(array.reduce(reducer));
}
Main(readFileSync('/dev/stdin', 'utf8'));