結果

問題 No.1101 鼻水
ユーザー H20
提出日時 2021-04-24 20:40:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 516 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-07-04 09:14:17
合計ジャッジ時間 2,376 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#めぐる式二分探索
#参考サイト:https://aotamasaki.hatenablog.com/entry/meguru_bisect

V,T,P = map(int, input().split())

def is_ok(time):
    # 許容範囲ならTrue
    return (P+1) * V + (time-1)//T >= time

def meguru_bisect(ng, ok):
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok



print(meguru_bisect(10**50 + 1, 0)+1)
0