結果
| 問題 | No.1485 運賃 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-01 19:41:01 |
| 言語 | OCaml (5.5.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 415 bytes |
| 記録 | |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 21,480 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-09-21 15:07:14 |
| 合計ジャッジ時間 | 1,138 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 5 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let split_on_char sep s =
let r = ref [] in
let j = ref (String.length s) in
for i = String.length s - 1 downto 0 do
if String.unsafe_get s i = sep then begin
r := String.sub s (i + 1) (!j - i - 1) :: !r;
j := i
end
done;
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 ();;