結果

問題 No.713 素数の和
ユーザー liny_tailliny_tail
提出日時 2020-09-21 18:53:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 590 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-06 17:53:03
合計ジャッジ時間 2,828 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 579 ms
7,832 KB
testcase_01 AC 13 ms
7,904 KB
testcase_02 AC 13 ms
7,856 KB
testcase_03 AC 170 ms
7,848 KB
testcase_04 AC 590 ms
7,844 KB
testcase_05 AC 42 ms
7,940 KB
testcase_06 AC 12 ms
7,768 KB
testcase_07 AC 14 ms
7,764 KB
testcase_08 AC 50 ms
7,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input().strip())

factor = []

for i in range(2, N+1):
  for j in range(2, i + 1):
    for k in factor:
      if j % k == 0:
        break
    else:
      factor.append(j)
print(sum(factor))
0