結果
| 問題 | No.1058 素敵な数 |
| コンテスト | |
| ユーザー |
prd_xxx
|
| 提出日時 | 2020-06-19 20:50:00 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 20,000 KB |
| 最終ジャッジ日時 | 2024-06-30 05:54:17 |
| 合計ジャッジ時間 | 3,551 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 8 |
ソースコード
N = int(input())
if N==1:
print(1)
exit()
def is_prime(n):
if n == 2: return True
if n < 2 or n%2 == 0: return False
m = 3
while m*m <= n:
if n%m == 0: return False
m += 2
return True
arr = []
for n in range(100001, 1001000):
if is_prime(n):
arr.append(n)
arr2 = []
for a in arr:
for b in arr:
arr2.append(a*b)
print(sorted(set(arr2))[N-2])
prd_xxx