結果
問題 |
No.1058 素敵な数
|
ユーザー |
![]() |
提出日時 | 2020-05-24 05:21:40 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 561 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 63,104 KB |
最終ジャッジ日時 | 2024-10-10 02:05:09 |
合計ジャッジ時間 | 1,387 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 WA * 7 |
ソースコード
n = int(input()) import math def sieve(n): ass = [] is_prime = [True]*(n+1) is_prime[0] = False is_prime[1] = False for i in range(2, int(math.sqrt(n))+1): if not is_prime[i]: continue for j in range(i*2, n+1, i): is_prime[j] = False for i in range(n+1): if is_prime[i]: ass.append(i) return(ass) S = sieve(10**5) T = sieve(2*10**5) #print(len(S)) #print(len(T)) P = T[len(S):len(S)+10] #print(P) ans = [1] for i in range(10): ans.append(P[0]*P[i]) print(ans[n-1])