結果

問題 No.1101 鼻水
ユーザー FromBooskaFromBooska
提出日時 2023-09-13 13:45:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 574 bytes
コンパイル時間 1,042 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 71,376 KB
最終ジャッジ日時 2023-09-13 13:45:40
合計ジャッジ時間 4,296 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,012 KB
testcase_01 AC 70 ms
71,168 KB
testcase_02 AC 71 ms
71,144 KB
testcase_03 AC 71 ms
71,132 KB
testcase_04 AC 72 ms
71,188 KB
testcase_05 AC 70 ms
71,124 KB
testcase_06 AC 72 ms
71,204 KB
testcase_07 AC 73 ms
71,236 KB
testcase_08 AC 72 ms
71,168 KB
testcase_09 AC 71 ms
71,016 KB
testcase_10 AC 71 ms
71,252 KB
testcase_11 AC 71 ms
71,376 KB
testcase_12 AC 70 ms
71,268 KB
testcase_13 AC 78 ms
71,116 KB
testcase_14 AC 69 ms
71,100 KB
testcase_15 AC 68 ms
71,092 KB
testcase_16 AC 69 ms
71,024 KB
testcase_17 AC 69 ms
71,092 KB
testcase_18 AC 69 ms
71,264 KB
testcase_19 AC 69 ms
71,308 KB
testcase_20 AC 69 ms
71,096 KB
testcase_21 AC 71 ms
71,116 KB
testcase_22 AC 71 ms
71,296 KB
testcase_23 AC 70 ms
71,212 KB
testcase_24 AC 71 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# ACだが前回はちゃんと式も考えているのでそれに従う
# 鼻をかむのを除いて鼻水量を式にすると
# f(t) = t-1 - (t-1)//T
# f(T)は単調増加であり、f(t)==V+P*Vになると醜態

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

def check(t):
    v = t-1 - (t-1)//T
    #print('t', t, 'v', v)
    if v < V+P*V:
        return 1
    else:
        return 0
    
#for t in range(0, 30):
#    print(t, check(t))
    
OK = 0
NG = 10**20
while (NG-OK)>1:
    mid = (NG+OK)//2
    if check(mid) == 1:
        OK = mid
    else:
        NG = mid
print(NG)
0