結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー mai
提出日時 2018-10-22 00:43:50
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 57,620 KB
最終ジャッジ日時 2024-10-13 00:51:21
合計ジャッジ時間 2,833 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 9 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

const cin = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line)=>{ cin.push(line); });
process.stdin.on('end', ()=>{main()});

Array.prototype.map_toInt = function(){ return this.map((e)=>+e); };

function main(){
    const N = +cin.shift();
    console.log(
        cin.shift().split(" ").map_toInt().reduce((s,e,i)=>(s+e))
    );
}
0