結果

問題 No.604 誕生日のお小遣い
コンテスト
ユーザー mban
提出日時 2017-12-15 17:02:20
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 221 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2026-10-03 13:33:24
合計ジャッジ時間 5,326 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2 TLE * 1
other WA * 1 -- * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

ok = 1e18
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