結果

問題 No.604 誕生日のお小遣い
ユーザー brthyyjpbrthyyjp
提出日時 2021-03-21 01:29:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 283 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 81,840 KB
実行使用メモリ 53,472 KB
最終ジャッジ日時 2024-05-01 11:16:04
合計ジャッジ時間 1,666 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,184 KB
testcase_01 AC 38 ms
52,268 KB
testcase_02 AC 38 ms
52,516 KB
testcase_03 AC 33 ms
52,436 KB
testcase_04 AC 32 ms
52,164 KB
testcase_05 AC 32 ms
52,180 KB
testcase_06 AC 32 ms
53,472 KB
testcase_07 AC 31 ms
52,952 KB
testcase_08 AC 33 ms
52,900 KB
testcase_09 AC 33 ms
51,824 KB
testcase_10 AC 31 ms
52,688 KB
testcase_11 AC 32 ms
52,360 KB
testcase_12 AC 32 ms
52,832 KB
testcase_13 AC 32 ms
51,944 KB
testcase_14 AC 35 ms
52,748 KB
testcase_15 AC 31 ms
52,000 KB
testcase_16 AC 32 ms
52,064 KB
testcase_17 AC 33 ms
52,456 KB
testcase_18 AC 31 ms
52,616 KB
testcase_19 AC 30 ms
52,588 KB
testcase_20 AC 31 ms
52,484 KB
testcase_21 AC 31 ms
52,540 KB
testcase_22 AC 32 ms
52,156 KB
testcase_23 AC 33 ms
51,884 KB
権限があれば一括ダウンロードができます

ソースコード

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