結果
問題 | No.598 オーバーフローファンタジー |
ユーザー |
![]() |
提出日時 | 2018-06-19 16:33:49 |
言語 | F# (F# 4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 9,650 ms |
コンパイル使用メモリ | 189,312 KB |
実行使用メモリ | 37,248 KB |
最終ジャッジ日時 | 2024-06-30 17:15:37 |
合計ジャッジ時間 | 21,409 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 RE * 6 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (235 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
// ---- / ̄ ̄ ̄ ̄ ̄ ̄ ̄///-+--+- / maybe AC. /// | | ∠____________/let f n x a b =let minOverFlow = pown 2 (n - 1)let zero = 0let calStep diff y =match diff % y with| 0 -> diff / y| _ -> diff / y + 1let attackStep = calStep (x - zero) alet healStep = calStep (minOverFlow - x) bmin attackStep healSteplet R () = stdin.ReadLine () |> intlet N = R ()let X = R ()let A = R ()let B = R ()f N X A B |> printfn "%i"