Anonymous user
Pernicious numbers: Difference between revisions
Updated to work with Nim 1.4: added missing parameter type.
(Updated to work with Nim 1.4: added missing parameter type.) |
|||
Line 1,497:
<lang nim>import strutils
proc count(s: string
var i = 0
while true:
Line 1,506:
inc result
proc popcount(n: int): int = n.toBin(64).count('1')
const primes = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61}
var p:
var i = 0
while p.len < 25:
|