結果
問題 |
No.1350 2019-6problem
|
ユーザー |
![]() |
提出日時 | 2022-07-17 14:21:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-29 15:26:25 |
合計ジャッジ時間 | 2,053 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
from math import gcd def check(x): ret = (x // A) + (x // B) - (x // (A * B // gcd(A, B))) if ret >= K: return True return False A,B,K = map(int,input().split()) ng = 0 ok = 1<<64 while ok - ng > 1: x = (ok+ng) // 2 if check(x): ok = x else: ng = x print(ok)