結果

問題 No.604 誕生日のお小遣い
ユーザー mmn15277198mmn15277198
提出日時 2021-04-09 05:50:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 64 ms / 1,000 ms
コード長 217 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 71,368 KB
最終ジャッジ日時 2023-09-06 15:03:34
合計ジャッジ時間 3,068 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,340 KB
testcase_01 AC 58 ms
71,304 KB
testcase_02 AC 60 ms
70,912 KB
testcase_03 AC 58 ms
71,192 KB
testcase_04 AC 61 ms
71,368 KB
testcase_05 AC 58 ms
71,176 KB
testcase_06 AC 57 ms
71,276 KB
testcase_07 AC 57 ms
71,204 KB
testcase_08 AC 59 ms
71,324 KB
testcase_09 AC 58 ms
71,288 KB
testcase_10 AC 59 ms
71,332 KB
testcase_11 AC 61 ms
71,368 KB
testcase_12 AC 60 ms
71,032 KB
testcase_13 AC 57 ms
71,124 KB
testcase_14 AC 58 ms
71,204 KB
testcase_15 AC 59 ms
71,116 KB
testcase_16 AC 64 ms
71,300 KB
testcase_17 AC 59 ms
71,120 KB
testcase_18 AC 58 ms
71,036 KB
testcase_19 AC 58 ms
71,176 KB
testcase_20 AC 61 ms
71,176 KB
testcase_21 AC 60 ms
71,116 KB
testcase_22 AC 61 ms
71,296 KB
testcase_23 AC 60 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a , b , c = list(map(int,input().split()))

ok = 10 ** 20 + 1
ng = -1

while ok - ng > 1:
    mid = (ok + ng) // 2
    if (mid // a * b) + mid - (mid // a) >= c:
        ok = mid
    else :
        ng = mid

print(ok)
0