結果

問題 No.1058 素敵な数
ユーザー tanon710tanon710
提出日時 2020-05-23 00:28:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 60,672 KB
最終ジャッジ日時 2024-04-15 20:14:58
合計ジャッジ時間 1,544 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
60,160 KB
testcase_01 AC 47 ms
60,160 KB
testcase_02 AC 48 ms
60,672 KB
testcase_03 AC 47 ms
60,032 KB
testcase_04 AC 47 ms
60,288 KB
testcase_05 AC 49 ms
60,416 KB
testcase_06 AC 48 ms
60,160 KB
testcase_07 AC 47 ms
60,160 KB
testcase_08 AC 49 ms
60,672 KB
testcase_09 AC 47 ms
60,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime(n):
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            return False
    return True

n=int(input())
primes=[]
for i in range(10**5+1,10**5+1000):
    if prime(i)==True:
        primes.append(i)
ans=[0,1]
for i in range(len(primes)):
    for j in range(i,len(primes)):
        ans.append((primes[i]*primes[j]))
ans=sorted(ans)
print(ans[n])
0