結果

問題 No.1350 2019-6problem
ユーザー hir355hir355
提出日時 2021-01-17 14:11:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 71,624 KB
最終ジャッジ日時 2023-08-19 20:05:17
合計ジャッジ時間 3,275 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,304 KB
testcase_01 AC 69 ms
71,304 KB
testcase_02 AC 69 ms
71,400 KB
testcase_03 AC 72 ms
71,100 KB
testcase_04 AC 69 ms
71,084 KB
testcase_05 AC 68 ms
71,452 KB
testcase_06 AC 69 ms
71,100 KB
testcase_07 AC 68 ms
71,244 KB
testcase_08 AC 69 ms
71,068 KB
testcase_09 AC 68 ms
71,212 KB
testcase_10 AC 69 ms
71,460 KB
testcase_11 AC 69 ms
71,240 KB
testcase_12 AC 70 ms
71,592 KB
testcase_13 AC 69 ms
71,396 KB
testcase_14 AC 68 ms
71,524 KB
testcase_15 AC 67 ms
71,268 KB
testcase_16 AC 70 ms
71,332 KB
testcase_17 AC 70 ms
71,324 KB
testcase_18 AC 71 ms
71,324 KB
testcase_19 AC 68 ms
71,328 KB
testcase_20 AC 69 ms
71,624 KB
testcase_21 AC 69 ms
71,428 KB
testcase_22 AC 70 ms
71,240 KB
testcase_23 AC 69 ms
71,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

a,b,k=map(int,input().split())
l,r=0,10**19
while r - l > 1:
  m = (l + r)//2
  if m//a+m//b-m//(a*b/gcd(a,b))>=k:
    r=m
  else:
    l=m
print(r)
0