結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー horitaka1999
提出日時 2021-07-23 00:21:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,788 KB
実行使用メモリ 77,952 KB
最終ジャッジ日時 2024-07-17 21:39:42
合計ジャッジ時間 10,922 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

primes = [2,3,5,7,11,13,17,19,23,29,31]
from collections import defaultdict
def f(x):
    tmp = x
    dic = defaultdict(int)
    coordinate = []
    for p in primes:
        cnt = 0
        while tmp % p == 0:
            tmp = tmp//p
            cnt += 1
        dic[p] = cnt
        coordinate.append(p**(cnt+1))
    return min(coordinate) * x 
T = int(input())
for _ in range(T):
    x = int(input())
    print(f(x))
0