結果

問題 No.1350 2019-6problem
ユーザー ryusukeryusuke
提出日時 2022-01-30 16:11:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-09-02 01:40:47
合計ジャッジ時間 3,057 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,376 KB
testcase_01 AC 70 ms
71,372 KB
testcase_02 AC 70 ms
71,336 KB
testcase_03 AC 71 ms
71,240 KB
testcase_04 AC 71 ms
71,068 KB
testcase_05 AC 71 ms
71,532 KB
testcase_06 AC 71 ms
71,092 KB
testcase_07 AC 70 ms
71,336 KB
testcase_08 AC 71 ms
71,228 KB
testcase_09 AC 71 ms
71,400 KB
testcase_10 AC 71 ms
71,244 KB
testcase_11 AC 72 ms
71,324 KB
testcase_12 AC 72 ms
71,352 KB
testcase_13 WA -
testcase_14 AC 70 ms
71,480 KB
testcase_15 AC 70 ms
71,432 KB
testcase_16 AC 71 ms
71,224 KB
testcase_17 WA -
testcase_18 AC 69 ms
71,252 KB
testcase_19 AC 69 ms
71,224 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 70 ms
71,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

'''
答えをkとする
<=> k以下の自然数でa, bの倍数がk個ある
'''

l, r = 0, 10 ** 18 + 1
while r - l > 1:
    mid = (l + r) // 2
    cnt = mid // a + mid // b - mid // (a * b)
    if cnt >= k:
        r = mid
    else:
        l = mid

print(r)
0