結果

問題 No.1058 素敵な数
ユーザー ああいいああいい
提出日時 2022-01-27 22:05:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 88,456 KB
最終ジャッジ日時 2023-08-27 00:18:29
合計ジャッジ時間 2,414 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,264 KB
testcase_01 AC 114 ms
88,284 KB
testcase_02 AC 112 ms
88,180 KB
testcase_03 AC 112 ms
88,280 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 112 ms
88,328 KB
testcase_07 AC 112 ms
88,456 KB
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
import sys
if N == 1:
    print(1)
    exit()
    
dat = [0] * 10 ** 6
C = 10 ** 6
prime = []
for i in range(2,C):
    if dat[i] == 0:
        for j in range(i*2,C,i):
            dat[j] = 1
        if i > 10 ** 5:
            prime.append(i)
l = []
for i in range(4):
    for j in range(i,4):
        l.append(prime[i] * prime[j])
l.sort()
print(l[N-2])
0