結果
問題 |
No.598 オーバーフローファンタジー
|
ユーザー |
![]() |
提出日時 | 2017-11-24 23:20:13 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 08:13:53 |
合計ジャッジ時間 | 1,282 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 27 |
ソースコード
n = input() hp = input() attack = input() heal = input() def kill_by_attack(hp,attack): time = hp / attack return time def kill_by_heal(n,hp,heal): over_flow_hp = 2 ** n - 2 ** (n - 1) - 1 time = (over_flow_hp-hp)/heal return time print min(kill_by_attack(hp,attack),kill_by_heal(n,hp,heal))