結果
| 問題 |
No.1350 2019-6problem
|
| コンテスト | |
| ユーザー |
Kite_kuma
|
| 提出日時 | 2021-01-17 14:51:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 379 bytes |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-29 16:33:12 |
| 合計ジャッジ時間 | 2,083 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import math
a, b, k = map(int, input().split())
def calc(x):
global a, b
res = 0
res += x // a
res += x // b
res -= x // (a / math.gcd(a, b) * b)
return res
small, large = 0, 9999999999999999999999999
while small < large - 1:
mid = small + large
mid >>= 1
if calc(mid) < k:
small = mid
else:
large = mid
print(large)
Kite_kuma