結果
問題 |
No.2526 Kth Not-divisible Number
|
ユーザー |
![]() |
提出日時 | 2023-11-03 21:30:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 237 bytes |
コンパイル時間 | 229 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 83,072 KB |
最終ジャッジ日時 | 2024-09-25 19:19:03 |
合計ジャッジ時間 | 4,174 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 1 TLE * 1 -- * 8 |
ソースコード
t=int(input()) import math for _ in range(t): a,b,k=map(int,input().split()) g=math.gcd(a,b) ok=0 ng=10**30 while abs(ok-ng)>1: m=(ok+ng)//2 if m-(m//a+m//b-m//((a*b)//g))<=k: ok=m else: ng=m print(ok)