結果

問題 No.1058 素敵な数
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-03-22 23:24:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 63,616 KB
最終ジャッジ日時 2024-04-19 01:00:02
合計ジャッジ時間 1,532 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
63,104 KB
testcase_01 AC 61 ms
63,360 KB
testcase_02 AC 59 ms
63,616 KB
testcase_03 AC 59 ms
63,616 KB
testcase_04 AC 60 ms
63,488 KB
testcase_05 AC 61 ms
63,232 KB
testcase_06 AC 58 ms
63,616 KB
testcase_07 AC 62 ms
63,616 KB
testcase_08 AC 60 ms
63,360 KB
testcase_09 AC 61 ms
63,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M = 2*10**5
prime = [0]*M
cand = []
for i in range(2,M):
    if prime[i]:
        continue
    if i > 10**5:
        cand.append(i)
    for j in range(i,M,i):
        prime[j] = 1


n = int(input())
cand = cand[:20]
ans = [1]
for c in cand:
    for d in cand:
        ans.append(c*d)

ans = sorted(set(ans))

print(ans[n-1])
0