結果
| 問題 |
No.1058 素敵な数
|
| コンテスト | |
| ユーザー |
kbys
|
| 提出日時 | 2020-06-02 01:07:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 553 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 82,320 KB |
| 実行使用メモリ | 66,544 KB |
| 最終ジャッジ日時 | 2024-11-22 17:54:57 |
| 合計ジャッジ時間 | 1,409 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 9 |
ソースコード
#1058
import numpy as np
import itertools
def create_prime_list(limit):
x = limit**0.5
primes = []
#print('x={0}'.format(x))
nums = [x for x in range(2, limit+1)]
while nums[0]<=x:
primes.append(nums[0])
current_prime = nums[0]
nums = [x for x in nums if x%current_prime != 0]
primes.extend(nums)
return primes
N = int(input())
ans = [1]
s = np.array(create_prime_list(10**6))
s = s[s>100000][:10]
#print(s)
for i,j in itertools.combinations(s, 2):
ans.append(i*j)
ans.sort()
print(ans[N-1])
kbys