結果
| 問題 |
No.713 素数の和
|
| コンテスト | |
| ユーザー |
qumazaki
|
| 提出日時 | 2020-09-01 00:15:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 216 bytes |
| コンパイル時間 | 241 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 57,728 KB |
| 最終ジャッジ日時 | 2024-11-17 02:59:58 |
| 合計ジャッジ時間 | 1,231 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 |
ソースコード
n = int(input())
ans = 0
sieve = [True] * (n+1)
sieve[0] = False
sieve[1] = False
for i in range(2,n+1):
if(sieve[i]):
ans += i
for j in range(i*2,n+1,i):
sieve[j] = False
print(ans)
qumazaki