結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー tamatotamato
提出日時 2021-07-21 21:51:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 549 ms / 2,000 ms
コード長 1,098 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,412 KB
実行使用メモリ 77,268 KB
最終ジャッジ日時 2024-04-14 05:15:07
合計ジャッジ時間 7,525 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 549 ms
76,976 KB
testcase_01 AC 185 ms
77,036 KB
testcase_02 AC 183 ms
76,864 KB
testcase_03 AC 173 ms
76,836 KB
testcase_04 AC 177 ms
76,900 KB
testcase_05 AC 187 ms
77,268 KB
testcase_06 AC 190 ms
76,924 KB
testcase_07 AC 175 ms
76,648 KB
testcase_08 AC 175 ms
76,604 KB
testcase_09 AC 216 ms
76,604 KB
testcase_10 AC 117 ms
76,480 KB
testcase_11 AC 126 ms
76,936 KB
testcase_12 AC 121 ms
76,772 KB
testcase_13 AC 126 ms
76,864 KB
testcase_14 AC 130 ms
76,576 KB
testcase_15 AC 132 ms
76,864 KB
testcase_16 AC 123 ms
76,992 KB
testcase_17 AC 127 ms
76,892 KB
testcase_18 AC 128 ms
76,468 KB
testcase_19 AC 57 ms
66,668 KB
testcase_20 AC 56 ms
66,932 KB
testcase_21 AC 57 ms
66,432 KB
testcase_22 AC 50 ms
63,628 KB
testcase_23 AC 50 ms
62,936 KB
testcase_24 AC 52 ms
64,516 KB
testcase_25 AC 56 ms
66,600 KB
testcase_26 AC 56 ms
66,044 KB
testcase_27 AC 61 ms
66,776 KB
testcase_28 AC 37 ms
53,344 KB
testcase_29 AC 38 ms
53,152 KB
testcase_30 AC 37 ms
53,740 KB
testcase_31 AC 37 ms
53,400 KB
testcase_32 AC 38 ms
53,696 KB
testcase_33 AC 38 ms
52,392 KB
testcase_34 AC 37 ms
52,844 KB
testcase_35 AC 37 ms
53,696 KB
testcase_36 AC 37 ms
52,860 KB
testcase_37 AC 38 ms
53,512 KB
testcase_38 AC 37 ms
52,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    def PrimeDecomposition(N):
        ret = {}
        n = int(N ** 0.5)
        for d in range(2, n + 1):
            while N % d == 0:
                if d not in ret:
                    ret[d] = 1
                else:
                    ret[d] += 1
                N //= d
            if N == 1:
                break
        if N != 1:
            ret[N] = 1
        return ret

    D = [None for _ in range(101)]
    for i in range(1, 101):
        D[i] = PrimeDecomposition(i)

    for _ in range(int(input())):
        X = int(input())
        for i in range(2, 101):
            P = D[i]
            upper = lower = 1
            for p in P:
                d = P[p]
                e = 0
                XX = X
                while XX % p == 0:
                    e += 1
                    XX //= p
                upper *= d + e + 1
                lower *= e + 1
            if upper == lower * 2:
                print(i * X)
                break


if __name__ == '__main__':
    main()
0