結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー ayaoniayaoni
提出日時 2021-07-21 21:55:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 378 ms / 2,000 ms
コード長 1,187 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 76,920 KB
最終ジャッジ日時 2024-04-14 05:16:27
合計ジャッジ時間 7,762 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 378 ms
76,488 KB
testcase_01 AC 214 ms
76,776 KB
testcase_02 AC 212 ms
76,416 KB
testcase_03 AC 217 ms
76,764 KB
testcase_04 AC 213 ms
76,452 KB
testcase_05 AC 211 ms
76,644 KB
testcase_06 AC 214 ms
76,784 KB
testcase_07 AC 209 ms
76,560 KB
testcase_08 AC 212 ms
76,436 KB
testcase_09 AC 216 ms
76,484 KB
testcase_10 AC 155 ms
76,464 KB
testcase_11 AC 152 ms
76,452 KB
testcase_12 AC 158 ms
76,416 KB
testcase_13 AC 162 ms
76,920 KB
testcase_14 AC 157 ms
76,468 KB
testcase_15 AC 156 ms
76,488 KB
testcase_16 AC 167 ms
76,804 KB
testcase_17 AC 156 ms
76,476 KB
testcase_18 AC 164 ms
76,504 KB
testcase_19 AC 59 ms
68,644 KB
testcase_20 AC 60 ms
68,080 KB
testcase_21 AC 62 ms
68,352 KB
testcase_22 AC 61 ms
67,796 KB
testcase_23 AC 60 ms
68,848 KB
testcase_24 AC 60 ms
69,304 KB
testcase_25 AC 58 ms
68,444 KB
testcase_26 AC 59 ms
67,656 KB
testcase_27 AC 59 ms
69,352 KB
testcase_28 AC 37 ms
52,744 KB
testcase_29 AC 36 ms
52,824 KB
testcase_30 AC 37 ms
53,356 KB
testcase_31 AC 40 ms
53,112 KB
testcase_32 AC 37 ms
52,648 KB
testcase_33 AC 38 ms
53,992 KB
testcase_34 AC 37 ms
53,568 KB
testcase_35 AC 38 ms
53,424 KB
testcase_36 AC 37 ms
52,464 KB
testcase_37 AC 37 ms
53,820 KB
testcase_38 AC 36 ms
53,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


T = I()
primes = [2,3,5,7,11,13,17,19,23,29,31]
prime_fac = [[0]*11 for _ in range(32)]
for i in range(11):
    p = primes[i]
    for j in range(p,32,p):
        k = j
        count = 0
        while k % p == 0:
            count += 1
            k //= p
        prime_fac[j][i] = count

for _ in range(T):
    N = I()
    index = [0]*11
    for i in range(11):
        M = N
        p = primes[i]
        count = 0
        while M % p == 0:
            count += 1
            M //= p
        index[i] = count
    d = 1
    for i in index:
        d *= i+1

    for i in range(2,32):
        dd = 1
        for j in range(11):
            dd *= index[j]+1+prime_fac[i][j]
        if dd == 2*d:
            print(N*i)
            break
0