結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー nikkukun
提出日時 2021-07-21 22:28:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,852 KB
実行使用メモリ 76,892 KB
最終ジャッジ日時 2024-07-17 19:25:10
合計ジャッジ時間 11,869 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
divs = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]

for i in range(t):
	n = int(input())
	ans = pow(10, 30)

	for d in divs:
		cnt = 0
		x = n
		while x % d == 0:
			x /= d
			cnt += 1
		ans = min(ans, n * pow(d, cnt + 1))
	
	print(ans)
		

0