結果
問題 | No.1485 運賃 |
ユーザー |
|
提出日時 | 2021-06-01 19:41:01 |
言語 | OCaml (5.2.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 415 bytes |
コンパイル時間 | 419 ms |
コンパイル使用メモリ | 19,564 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-09 00:15:14 |
合計ジャッジ時間 | 800 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 5 |
ソースコード
let split_on_char sep s =let r = ref [] inlet j = ref (String.length s) infor i = String.length s - 1 downto 0 doif String.unsafe_get s i = sep then beginr := String.sub s (i + 1) (!j - i - 1) :: !r;j := ienddone;String.sub s 0 !j :: !r;;let input () =read_line () |> split_on_char ' ' |> List.map int_of_string |>List.fold_left (+) 0 |> print_int; print_newline ();;