結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー ああいいああいい
提出日時 2022-03-05 18:54:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,586 ms / 2,000 ms
コード長 827 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 90,452 KB
最終ジャッジ日時 2023-09-27 06:50:30
合計ジャッジ時間 19,218 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,586 ms
89,904 KB
testcase_01 AC 637 ms
89,992 KB
testcase_02 AC 622 ms
90,308 KB
testcase_03 AC 653 ms
90,180 KB
testcase_04 AC 674 ms
90,436 KB
testcase_05 AC 657 ms
89,932 KB
testcase_06 AC 617 ms
89,864 KB
testcase_07 AC 618 ms
89,992 KB
testcase_08 AC 626 ms
89,892 KB
testcase_09 AC 639 ms
90,012 KB
testcase_10 AC 447 ms
90,276 KB
testcase_11 AC 475 ms
90,320 KB
testcase_12 AC 447 ms
90,064 KB
testcase_13 AC 460 ms
90,048 KB
testcase_14 AC 435 ms
90,080 KB
testcase_15 AC 437 ms
89,968 KB
testcase_16 AC 443 ms
90,000 KB
testcase_17 AC 432 ms
90,040 KB
testcase_18 AC 484 ms
89,992 KB
testcase_19 AC 181 ms
89,992 KB
testcase_20 AC 177 ms
90,432 KB
testcase_21 AC 185 ms
90,064 KB
testcase_22 AC 182 ms
89,992 KB
testcase_23 AC 176 ms
90,184 KB
testcase_24 AC 170 ms
89,972 KB
testcase_25 AC 175 ms
90,176 KB
testcase_26 AC 173 ms
89,944 KB
testcase_27 AC 174 ms
90,008 KB
testcase_28 AC 125 ms
89,996 KB
testcase_29 AC 124 ms
90,316 KB
testcase_30 AC 124 ms
89,840 KB
testcase_31 AC 125 ms
89,992 KB
testcase_32 AC 125 ms
90,452 KB
testcase_33 AC 125 ms
90,040 KB
testcase_34 AC 126 ms
89,972 KB
testcase_35 AC 123 ms
89,884 KB
testcase_36 AC 128 ms
89,788 KB
testcase_37 AC 125 ms
90,052 KB
testcase_38 AC 128 ms
90,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

C = 10 ** 6
dat = [0] * C
prime = []
for i in range(2,C):
    if dat[i] == 0:
        prime.append(i)
        for j in range(2 * i,C,i):
            dat[j] = 1
from collections import defaultdict

for _ in range(T):
    X = int(input())
    d = defaultdict(int)
    P = -1
    u = X
    for p in prime:
        if X % p != 0:
            P = p
            break
        while X % p == 0:
            d[p] += 1
            X //= p
    num = 1
    for v in d.values():
        num *= (v + 1)
    for j in range(2,p+1):
        div = 1
        t = j
        for k in prime:
            if k > p:break
            count = 0
            while j % k == 0:
                count += 1
                j //= k
            div *= (d[k] + 1 + count)
        if div == 2 * num:
            print(t * u)
            break
0