結果
問題 | No.656 ゴルフ |
ユーザー |
|
提出日時 | 2020-06-14 11:05:37 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 21,572 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:02:16 |
合計ジャッジ時間 | 815 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
Scanf.scanf "%s" (fun s -> let n = String.length s in let rec loop i acc = if i = n then acc else loop (i + 1) (acc + if s.[i] = '0' then 10 else int_of_char s.[i] - 48) in loop 0 0 |> Printf.printf "%d\n" )