結果
問題 |
No.713 素数の和
|
ユーザー |
![]() |
提出日時 | 2018-07-23 13:05:04 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 236 bytes |
コンパイル時間 | 3,191 ms |
コンパイル使用メモリ | 65,004 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 03:16:43 |
合計ジャッジ時間 | 3,529 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
import strutils, math proc judge(n: int): int = var i = 2 while i ^ 2 <= n: if n mod i == 0: return i += 1 return n let N = parseInt readLine stdin var cnt = 0 for i in 2 .. N: cnt += i.judge echo cnt