結果
問題 |
No.1611 Minimum Multiple with Double Divisors
|
ユーザー |
|
提出日時 | 2021-07-23 00:44:59 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 796 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 82,148 KB |
実行使用メモリ | 82,208 KB |
最終ジャッジ日時 | 2024-07-17 22:02:20 |
合計ジャッジ時間 | 41,977 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 TLE * 10 |
ソースコード
primes = [2,3,5,7,11,13,17,19,23,29,31] from collections import defaultdict def f(x): tmp = x yaku1 = 1 dic = defaultdict(int) coordinate = [] for p in primes: cnt = 0 while tmp % p == 0: tmp = tmp//p cnt += 1 dic[p] = cnt yaku1 *= (cnt+1) coordinate.append(p**(cnt+1)) for i in range(2,32): tmp = x * i yaku2 = 1 for p in primes: cnt = 0 while tmp % p == 0: tmp = tmp //p cnt += 1 yaku2 *= (cnt+1) if 2 * yaku1 == yaku2: coordinate.append(i) return min(coordinate) * x T = int(input()) store = [] for _ in range(T): x = int(input()) store.append(x) for x in store: print(f(x))