結果
問題 | No.104 国道 |
ユーザー |
|
提出日時 | 2020-06-15 20:27:37 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 273 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 21,572 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:17:25 |
合計ジャッジ時間 | 1,078 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
Scanf.scanf "%s" (fun s ->let n = String.length s inlet rec loop i cur =if i = n then cur elseif s.[i] = 'L' then loop (i + 1) (cur * 2)else loop (i + 1) (cur * 2 + 1)inloop 0 1 |> Printf.printf "%d\n")