結果
| 問題 |
No.1058 素敵な数
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2020-10-07 22:12:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 605 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-20 04:15:26 |
| 合計ジャッジ時間 | 1,108 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
N=int(input())
if N==1:
print(1)
exit()
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.append([temp, 1])
if arr==[]:
arr.append([n, 1])
return arr
D=[]
d=10**5-1
for i in range(1,70):
d+=2
e=factorization(d)
if len(e)==1:
D.append(d)
ans=[]
for i in D:
for j in D:
ans.append(i*j)
E=list(set(ans))
E=sorted(E)
print(E[N-2])
timi