Submit Info #2670

Problem Lang User Status Time Memory
Factorize pypy3 renoyu TLE 10000 ms 31.97 MiB

ケース詳細
Name Status Time Memory
big2_00 TLE 10000 ms -1 Mib
big2_01 TLE 10000 ms -1 Mib
big2_02 TLE 10000 ms -1 Mib
example_00 AC 67 ms 31.93 MiB
random_00 TLE 10000 ms -1 Mib
random_01 TLE 10000 ms -1 Mib
random_02 TLE 10000 ms -1 Mib
small_00 AC 66 ms 31.97 MiB
small_01 AC 67 ms 31.85 MiB
small_02 AC 70 ms 31.89 MiB

import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] aa = x[0] su = 1 for i in range(len(x)-1): if aa != x[i+1]: a.append([aa,su]) aa = x[i+1] su = 1 else: su += 1 a.append([aa,su]) return a def jo(x): #listをスペースごとに分ける return " ".join(map(str,x)) def max2(x): #他のときもどうように作成可能 return max(map(max,x)) def In(x,a): #aがリスト(sorted) k = bs.bisect_left(a,x) if k != len(a) and a[k] == x: return True else: return False """ def nibu(x,n,r): ll = 0 rr = r while True: mid = (ll+rr)//2 if rr == mid: return ll if (ここに評価入れる): rr = mid else: ll = mid+1 """ def prime_decomposition(n): #素因数分解 i = 2 table = [] while i * i <= n: while n % i == 0: n /= i table.append(i) i += 1 if n > 1: table.append(int(n)) return table def make_divisors(n): #約数列挙 divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) # divisors.sort() return divisors n = onem() for i in range(n): p = onem() pp = prime_decomposition(p) print("{0} {1}".format(len(pp),jo(pp)))