Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
37
Task/Arithmetic-numbers/Quackery/arithmetic-numbers.quackery
Normal file
37
Task/Arithmetic-numbers/Quackery/arithmetic-numbers.quackery
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[ factors
|
||||
0 over witheach +
|
||||
swap size mod 0 = ] is arithmetic ( n --> b )
|
||||
|
||||
[ temp put [] 1
|
||||
[ over size temp share < while
|
||||
dup arithmetic if
|
||||
[ tuck join swap ]
|
||||
1+
|
||||
again ]
|
||||
drop
|
||||
temp release ] is arithmetics ( n --> [ )
|
||||
|
||||
say "First 100 arithmetic numbers:"
|
||||
cr
|
||||
100 arithmetics echo
|
||||
cr cr
|
||||
say "1000th arithmetic number: "
|
||||
1000 arithmetics
|
||||
dup -1 peek
|
||||
echo cr
|
||||
say "Composites in first 1000: "
|
||||
behead drop
|
||||
0 swap witheach
|
||||
[ isprime not + ]
|
||||
echo
|
||||
cr cr
|
||||
say "10000th arithmetic number: "
|
||||
10000 arithmetics
|
||||
dup -1 peek
|
||||
echo cr
|
||||
say "Composites in first 10000: "
|
||||
behead drop
|
||||
0 swap witheach
|
||||
[ isprime not + ]
|
||||
echo
|
||||
cr
|
||||
Loading…
Add table
Add a link
Reference in a new issue