結果

問題 No.1058 素敵な数
ユーザー ttrttr
提出日時 2020-05-24 21:56:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,688 KB
最終ジャッジ日時 2024-04-20 13:16:16
合計ジャッジ時間 10,448 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 871 ms
18,560 KB
testcase_01 AC 942 ms
18,560 KB
testcase_02 AC 889 ms
18,432 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

M = 10**5
L = [0]*(10*M+1)
L2 = []
for i in range(2, 10*M+1):
    if L[i] == 0:
        j = 1
        while i*j <= 10*M:
            L[i*j] = 1
            j += 1
        if i > M:
            L2.append(i)
        if len(L2) > N:
            break
ans = [1]
for i in range(N):
    for j in range(N):
        ans.append(L2[i]*L2[j])
ans.sort()
print(ans[N-1])
0