結果

問題 No.604 誕生日のお小遣い
ユーザー mbanmban
提出日時 2017-12-15 17:08:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 1,000 ms
コード長 235 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,636 KB
実行使用メモリ 53,812 KB
最終ジャッジ日時 2024-05-01 14:30:28
合計ジャッジ時間 1,653 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
52,708 KB
testcase_01 AC 35 ms
53,264 KB
testcase_02 AC 33 ms
53,172 KB
testcase_03 AC 31 ms
53,812 KB
testcase_04 AC 33 ms
52,480 KB
testcase_05 AC 32 ms
53,160 KB
testcase_06 AC 34 ms
52,572 KB
testcase_07 AC 31 ms
53,224 KB
testcase_08 AC 32 ms
52,204 KB
testcase_09 AC 32 ms
53,312 KB
testcase_10 AC 31 ms
53,288 KB
testcase_11 AC 32 ms
53,632 KB
testcase_12 AC 34 ms
53,292 KB
testcase_13 AC 32 ms
53,348 KB
testcase_14 AC 31 ms
52,912 KB
testcase_15 AC 32 ms
52,376 KB
testcase_16 AC 33 ms
52,216 KB
testcase_17 AC 33 ms
52,504 KB
testcase_18 AC 31 ms
52,696 KB
testcase_19 AC 32 ms
52,460 KB
testcase_20 AC 33 ms
52,684 KB
testcase_21 AC 32 ms
52,820 KB
testcase_22 AC 32 ms
53,616 KB
testcase_23 AC 32 ms
53,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split())

ok = 1000000000000000000
ng = 0


def f(y):
    return y + (y // A) * (B - 1)


while ok - ng > 1:
    mid = (ok + ng) // 2
    if f(mid) >= C:
        ok = mid
    else:
        ng = mid

print(ok)
0