結果
問題 | No.1058 素敵な数 |
ユーザー | wolgnik |
提出日時 | 2020-05-22 21:33:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 153 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 71,552 KB |
最終ジャッジ日時 | 2024-04-15 16:04:22 |
合計ジャッジ時間 | 2,005 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 44 ms
51,712 KB |
testcase_01 | AC | 147 ms
71,040 KB |
testcase_02 | AC | 153 ms
71,552 KB |
testcase_03 | AC | 143 ms
71,296 KB |
testcase_04 | AC | 145 ms
71,168 KB |
testcase_05 | AC | 150 ms
71,168 KB |
testcase_06 | AC | 145 ms
71,424 KB |
testcase_07 | AC | 143 ms
71,424 KB |
testcase_08 | AC | 147 ms
71,040 KB |
testcase_09 | AC | 145 ms
71,040 KB |
ソースコード
import sys input = sys.stdin.readline N = int(input()) if N == 1: print(1) exit(0) table = [1] * (10 ** 6) for i in range(2, 10 ** 5 + 1): for j in range(i, 10 ** 6, i): table[j] = 0 t = [] for i in range(2, 10 ** 6): if table[i]: t.append(i) if len(t) >= 10: break tt = [] for i in range(10): for j in range(i, 10): tt.append(t[i] * t[j]) tt.sort() print(tt[N - 2])