結果
問題 | No.2526 Kth Not-divisible Number |
ユーザー |
![]() |
提出日時 | 2023-11-03 21:33:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,256 KB |
最終ジャッジ日時 | 2024-09-25 19:26:59 |
合計ジャッジ時間 | 3,895 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 TLE * 1 -- * 8 |
ソースコード
from math import lcm for _ in range(int(input())): a,b,k = map(int,input().split()) m = lcm(a,b); ng = 0; ok = 3*10**18 while ok-ng>1: mid = (ng+ok)//2 if mid-(mid//a+mid//b-mid//m)>=k: ok = mid else: ng = mid print(ok)