結果

問題 No.1058 素敵な数
ユーザー flippergoflippergo
提出日時 2021-01-04 23:24:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,280 KB
実行使用メモリ 68,316 KB
最終ジャッジ日時 2024-04-23 08:14:52
合計ジャッジ時間 1,843 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
68,260 KB
testcase_01 AC 96 ms
67,572 KB
testcase_02 AC 95 ms
68,316 KB
testcase_03 AC 92 ms
68,064 KB
testcase_04 AC 90 ms
67,888 KB
testcase_05 AC 91 ms
68,068 KB
testcase_06 AC 90 ms
67,804 KB
testcase_07 AC 92 ms
68,224 KB
testcase_08 AC 91 ms
67,484 KB
testcase_09 AC 101 ms
68,256 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)==6:break
A = []
for i in range(5):
    for j in range(i,6):
        A.append(Q[i]*Q[j])
A = sorted(A)
A.insert(0,1)
N = int(input())
print(A[N-1])
0