結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
r6eve
|
| 提出日時 | 2017-08-15 10:07:35 |
| 言語 | OCaml (5.2.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 299 bytes |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 19,564 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 00:16:27 |
| 合計ジャッジ時間 | 1,375 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
let () =
let s = read_line () in
let n = String.length s in
let rec doit i c cnt =
if i = n then "NA"
else if s.[i] <> c then doit (i + 1) s.[i] 1
else if cnt + 1 < 3 then doit (i + 1) c (cnt + 1)
else if c = 'O' then "East"
else "West" in
doit 1 s.[0] 1 |> print_endline
r6eve