結果

問題 No.604 誕生日のお小遣い
ユーザー mbanmban
提出日時 2017-12-15 17:08:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 235 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 86,584 KB
実行使用メモリ 71,592 KB
最終ジャッジ日時 2023-08-14 01:27:12
合計ジャッジ時間 2,803 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,340 KB
testcase_01 AC 60 ms
71,316 KB
testcase_02 AC 60 ms
71,312 KB
testcase_03 AC 60 ms
71,592 KB
testcase_04 AC 60 ms
71,256 KB
testcase_05 AC 64 ms
71,248 KB
testcase_06 AC 60 ms
71,328 KB
testcase_07 AC 60 ms
71,124 KB
testcase_08 AC 59 ms
71,572 KB
testcase_09 AC 60 ms
71,300 KB
testcase_10 AC 60 ms
71,380 KB
testcase_11 AC 61 ms
71,372 KB
testcase_12 AC 62 ms
71,332 KB
testcase_13 AC 61 ms
71,272 KB
testcase_14 AC 62 ms
71,384 KB
testcase_15 AC 60 ms
71,196 KB
testcase_16 AC 58 ms
71,292 KB
testcase_17 AC 59 ms
71,524 KB
testcase_18 AC 59 ms
71,376 KB
testcase_19 AC 60 ms
71,304 KB
testcase_20 AC 61 ms
71,472 KB
testcase_21 AC 65 ms
71,320 KB
testcase_22 AC 62 ms
71,156 KB
testcase_23 AC 61 ms
71,252 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