結果

問題 No.604 誕生日のお小遣い
ユーザー Meso Meso
提出日時 2024-12-20 19:44:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 293 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-20 19:44:53
合計ジャッジ時間 2,266 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

print(check(a, b, c))
0