Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
35
Task/Pernicious-numbers/EasyLang/pernicious-numbers.easy
Normal file
35
Task/Pernicious-numbers/EasyLang/pernicious-numbers.easy
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
fastfunc isprim num .
|
||||
if num < 2
|
||||
return 0
|
||||
.
|
||||
i = 2
|
||||
while i <= sqrt num
|
||||
if num mod i = 0
|
||||
return 0
|
||||
.
|
||||
i += 1
|
||||
.
|
||||
return 1
|
||||
.
|
||||
func popc n .
|
||||
while n > 0
|
||||
r += n mod 2
|
||||
n = n div 2
|
||||
.
|
||||
return r
|
||||
.
|
||||
n = 1
|
||||
while cnt < 25
|
||||
if isprim popc n = 1
|
||||
write n & " "
|
||||
cnt += 1
|
||||
.
|
||||
n += 1
|
||||
.
|
||||
print ""
|
||||
n = 1
|
||||
for n = 888888877 to 888888888
|
||||
if isprim popc n = 1
|
||||
write n & " "
|
||||
.
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue