結果

問題 No.1058 素敵な数
ユーザー flippergoflippergo
提出日時 2021-01-04 23:22:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 69,044 KB
最終ジャッジ日時 2024-04-23 08:13:43
合計ジャッジ時間 1,682 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
68,992 KB
testcase_01 AC 78 ms
68,104 KB
testcase_02 AC 79 ms
67,188 KB
testcase_03 AC 80 ms
68,380 KB
testcase_04 AC 81 ms
67,540 KB
testcase_05 AC 80 ms
67,616 KB
testcase_06 AC 82 ms
69,044 KB
testcase_07 AC 79 ms
67,428 KB
testcase_08 WA -
testcase_09 AC 85 ms
68,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = [i for i in range(10**6)]
for i in range(2,1001):
    for j in range(i**2,10**6,i):
        P[j]=P[i]
Q = []
for i in range(10**5,10**6):
    if P[i]==i:
        Q.append(i)
        if len(Q)==5:break
A = []
for i in range(4):
    for j in range(i,5):
        A.append(Q[i]*Q[j])
A = sorted(A)
A.insert(0,1)
N = int(input())
print(A[N-1])
0