Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Anti-primes/Transd/anti-primes.transd
Normal file
19
Task/Anti-primes/Transd/anti-primes.transd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#lang transd
|
||||
|
||||
MainModule: {
|
||||
countDivs: (λ n Int() ret_ Int()
|
||||
(= ret_ 2)
|
||||
(for i in Range(2 (to-Int (/ (to-Double n) 2) 1)) do
|
||||
(if (not (mod n i)) (+= ret_ 1)))
|
||||
(ret ret_)
|
||||
),
|
||||
|
||||
_start: (λ locals: max 0 tmp 0 N 1 i 2
|
||||
(textout 1 " ")
|
||||
(while (< N 20)
|
||||
(= tmp (countDivs i))
|
||||
(if (> tmp max)
|
||||
(textout i " ") (= max tmp) (+= N 1))
|
||||
(+= i 1)
|
||||
))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue