結果
問題 |
No.713 素数の和
|
ユーザー |
|
提出日時 | 2019-07-16 14:42:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 243 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-11-30 14:16:10 |
合計ジャッジ時間 | 1,137 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 RE * 1 |
ソースコード
n = int(input()) a = {i for i in range(2, n+1)} import math q=set() while True: p=sorted(list(a.difference(q)))[0] if p > int(math.sqrt(n)): break q.add(p) for i in range(2,n//p+1): a.discard(p*i) print(sum(a))