結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2017-08-16 19:57:47 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 494 bytes |
コンパイル時間 | 375 ms |
コンパイル使用メモリ | 20,780 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 00:21:58 |
合計ジャッジ時間 | 892 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
let () =let s = read_line () inlet n = String.length s inlet horizontal_ellipsis_p i = i + 2 < n &&Char.code s.[i] = 0xe2 && Char.code s.[i+1] = 0x80 && Char.code s.[i+2] = 0xa6 inlet rec aux i z =if not (horizontal_ellipsis_p i) then i, zelse aux (i + 3) (z + 1) inlet rec doit i x =if i = n then xelse if not (horizontal_ellipsis_p i) then doit (i + 1) xelselet i, z = aux i 0 indoit i (max x z) indoit 0 0 |> Printf.printf "%d\n"