結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー 👑 Kazun
提出日時 2021-07-21 21:46:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 84,288 KB
最終ジャッジ日時 2024-07-17 17:22:24
合計ジャッジ時間 7,072 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(X):
    L=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]

    K=10**18
    for y in L:
        t=0
        x=X
        while x%y==0:
            t+=1
            x//=y

        if K>y**(t+1):
            K=y**(t+1)
    return K*X
import sys
input=sys.stdin.readline
write=sys.stdout.write

T=int(input())

Ans=[]
for _ in range(T):
    X=int(input())
    Ans.append(solve(X))

write("\n".join(map(str,Ans)))
0