結果
問題 | No.713 素数の和 |
ユーザー |
|
提出日時 | 2018-07-13 22:25:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-09 05:15:10 |
合計ジャッジ時間 | 838 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
n = int(input())tf = [True] * (n + 1)tf[0] = tf[1] = Falsefor i in range(int(n ** (1 / 2)) + 1):if tf[i]:for j in range(i ** 2, n + 1, i):tf[j] = Falseprint(sum([i for i in range(n + 1) if tf[i]]))