結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー necynecy
提出日時 2020-04-02 02:42:58
言語 OCaml
(5.1.0)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 19,600 KB
実行使用メモリ 21,520 KB
最終ジャッジ日時 2023-07-30 07:25:36
合計ジャッジ時間 2,262 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 3 ms
4,376 KB
testcase_07 AC 8 ms
5,964 KB
testcase_08 AC 24 ms
7,244 KB
testcase_09 AC 29 ms
8,908 KB
testcase_10 AC 92 ms
18,332 KB
testcase_11 AC 94 ms
18,488 KB
testcase_12 AC 97 ms
18,852 KB
testcase_13 AC 101 ms
19,132 KB
testcase_14 AC 103 ms
19,600 KB
testcase_15 AC 103 ms
19,756 KB
testcase_16 AC 115 ms
21,520 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

open Int64

let () =
    let n = read_int () in
    let nums = Array.init n (fun _ -> Scanf.scanf " %Ld" (fun a -> a )) in
    Array.fold_left (Int64.add) (0L) nums |> Printf.printf "%Ld\n"
0