結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2017-08-11 10:26:36 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 21,444 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 00:12:08 |
合計ジャッジ時間 | 1,433 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
let () = let x, y = Scanf.scanf "%s %s " (fun x y -> x, y) in let s = x ^ y in let n = String.length s in let rec doit i cnt m = if i = n then m else if s.[i] = 'x' then doit (i + 1) 0 m else let cnt = cnt + 1 in doit (i + 1) cnt (max m cnt) in doit 0 0 0 |> Printf.printf "%d\n"