結果
問題 | No.555 世界史のレポート |
ユーザー | kohei2019 |
提出日時 | 2022-02-11 13:46:29 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 520 ms |
コンパイル使用メモリ | 86,952 KB |
実行使用メモリ | 71,616 KB |
最終ジャッジ日時 | 2023-09-09 15:01:25 |
合計ジャッジ時間 | 2,995 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
71,184 KB |
testcase_01 | AC | 74 ms
71,296 KB |
testcase_02 | AC | 72 ms
71,340 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 70 ms
71,168 KB |
testcase_09 | AC | 71 ms
71,404 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 73 ms
71,268 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
ソースコード
N = int(input()) C,V = map(int,input().split()) # コピーを何回やるか cp = C+V ans = float('INF') for i in range(1,60): moji = 2**(i) cost = cp*i pmoji = 2**(i-1) if moji >= N: ans = min(ans,cost) else: cost += -(-(N-moji)//pmoji)*V ans = min(ans,cost) print(ans)