結果

問題 No.1058 素敵な数
ユーザー uw_yu1rabbituw_yu1rabbit
提出日時 2020-08-18 11:02:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 409 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 194,268 KB
最終ジャッジ日時 2024-04-20 07:17:16
合計ジャッジ時間 6,447 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import math
def main():
    n = int(input())
    a = [1]
    b = []
    for i in range(1000001, 100000001):
        flg = True
        for j in (2,math.sqrt(i)):
            if i % j == 0:
                flg = False
                break
        if flg:
            b.append(i)

    for i in range(len(b)):
        for j in range(1,10):
            a.append(b[i] * j)

    a.sort()
    print(a[n - 1])
main()
0