結果
問題 |
No.1453 手助け
|
ユーザー |
|
提出日時 | 2022-07-02 14:10:46 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 837 ms |
コンパイル使用メモリ | 21,444 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 07:53:14 |
合計ジャッジ時間 | 1,991 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
Scanf.scanf "%d %d %d %d %d" (fun a b c d e -> let calc v = let rec loop x i acc = if i > v then acc else let cur = if i mod 10 > 0 then x else if e <= x then x - e else x in loop cur (i + 1) (acc + cur) in if v = 0 then 0 else loop d 2 d in Printf.printf "%d\n" @@ calc (a * (b - c)) )