結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー rin204
提出日時 2022-01-26 16:49:50
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 615 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 82,136 KB
実行使用メモリ 77,536 KB
最終ジャッジ日時 2024-12-23 08:10:31
合計ジャッジ時間 19,942 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 36 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

prime = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]
def solve():
    x = int(input())
    for i in range(2, 32):
        if x % i != 0:
            print(x * i)
            return
        a = 1
        b = 1
        X = x
        for p in prime:
            cnt = 0
            while X % p == 0:
                X //= p
                cnt += 1
            b *= cnt + 1
            I = i
            while I % p == 0:
                I //= p
                cnt += 1
            a *= cnt + 1
        if a == 2 * b:
            print(x * i)
            return
            
    
for _ in range(int(input())):
    solve()
0