結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー mlpj56dmlpj56d
提出日時 2017-06-19 19:54:22
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 37 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 51,844 KB
最終ジャッジ日時 2024-04-21 01:44:02
合計ジャッジ時間 2,563 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
39,040 KB
testcase_01 AC 65 ms
39,552 KB
testcase_02 AC 65 ms
39,168 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 116 ms
48,260 KB
testcase_10 AC 111 ms
50,484 KB
testcase_11 AC 114 ms
50,548 KB
testcase_12 AC 116 ms
50,616 KB
testcase_13 AC 116 ms
50,920 KB
testcase_14 AC 120 ms
50,912 KB
testcase_15 AC 119 ms
51,184 KB
testcase_16 AC 122 ms
51,844 KB
testcase_17 AC 66 ms
39,552 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main (input) {
    var line = input.split("\n");
    var N = parseInt(line[0]);
    var data = line[1].split(" ");

    calc(N,data)
}

function calc(N,data) {   
    var sum = 0;
    for (var i= 0; i< N; i++){
        sum += parseInt(data[i]);
    }
    console.log(sum);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0