結果
問題 | No.1350 2019-6problem |
ユーザー |
![]() |
提出日時 | 2021-02-02 20:05:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 82,040 KB |
実行使用メモリ | 55,296 KB |
最終ジャッジ日時 | 2024-06-29 23:51:57 |
合計ジャッジ時間 | 2,137 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
a,b,k = map(int, input().split()) import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) l =lcm_base(a,b) def is_ok(x): t = x//a+x//b-x//l if t >= k: return True else: return False ng = 0 ok = a*k while ng+1 < ok: c = (ng+ok)//2 if is_ok(c): ok = c else: ng = c print(ok)