結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー necynecy
提出日時 2020-04-02 02:42:58
言語 OCaml
(5.1.0)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 21,572 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2024-04-17 08:52:53
合計ジャッジ時間 2,111 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 8 ms
6,144 KB
testcase_08 AC 26 ms
7,296 KB
testcase_09 AC 32 ms
8,832 KB
testcase_10 AC 98 ms
18,304 KB
testcase_11 AC 100 ms
18,560 KB
testcase_12 AC 103 ms
18,816 KB
testcase_13 AC 105 ms
19,072 KB
testcase_14 AC 109 ms
19,584 KB
testcase_15 AC 109 ms
19,692 KB
testcase_16 AC 120 ms
21,248 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,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