結果

問題 No.627 ランダムウォークの軌跡
ユーザー xsd
提出日時 2020-06-15 03:40:33
言語 OCaml
(5.2.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 245 ms
コンパイル使用メモリ 21,444 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 01:15:41
合計ジャッジ時間 1,290 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

Scanf.scanf "%d" (fun t ->
    let rec loop i cur =
        if i = t then "T" else
            let x = Scanf.scanf " %d" (fun x -> x) in
            if abs (cur - x) = 1 then loop (i + 1) x
                                 else "F"
    in
    loop 0 0 |> print_endline
)
0