結果

問題 No.604 誕生日のお小遣い
ユーザー brthyyjp
提出日時 2021-03-21 01:29:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 283 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 82,784 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2024-11-21 15:09:23
合計ジャッジ時間 1,964 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def is_ok(x):
    z = x//a
    y = z*b+(x-z)*1
    if y >= c:
        return True
    else:
        return False

ng = 0
ok = 10**18+1
while ng+1 < ok:
    mid = (ng+ok)//2
    if is_ok(mid):
        ok = mid
    else:
        ng = mid
print(ok)
0