Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
29
Task/Super-d-numbers/Amazing-Hopper/super-d-numbers.hopper
Normal file
29
Task/Super-d-numbers/Amazing-Hopper/super-d-numbers.hopper
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <basico.h>
|
||||
|
||||
algoritmo
|
||||
|
||||
decimales '0'
|
||||
d=2
|
||||
ir a sub mientras ( #(d<=8), encontrar súperd )
|
||||
|
||||
terminar
|
||||
|
||||
subrutinas
|
||||
|
||||
sub( encontrar súperd )
|
||||
imprimir("First 10 super-",d," numbers:\n")
|
||||
count=0, j = 3.0, target=""
|
||||
#(target = replicate( chr( 48 + d), d ))
|
||||
iterar mientras ' #(count < 10) '
|
||||
cuando( #(occurs(target, string( (j^d) * d ))) ){
|
||||
si ( #( find(target,string( (j^d) * d ))<=16-d+1 ) )
|
||||
++count, #((j^d) * d ),";"#(int(j)),"\n", imprimir
|
||||
sino
|
||||
imprimir("Error by limited floating-point\n")
|
||||
fin si
|
||||
}
|
||||
++j
|
||||
reiterar
|
||||
saltar
|
||||
++d
|
||||
retornar
|
||||
19
Task/Super-d-numbers/Quackery/super-d-numbers.quackery
Normal file
19
Task/Super-d-numbers/Quackery/super-d-numbers.quackery
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[ over findseq swap found ] is hasseq ( [ x --> b )
|
||||
|
||||
[ [] swap
|
||||
[ 10 /mod
|
||||
rot join swap
|
||||
dup 0 = until ]
|
||||
drop ] is digits ( n --> [ )
|
||||
|
||||
[ over ** over * digits
|
||||
swap dup of hasseq ] is superd ( n --> b )
|
||||
|
||||
[] 5 times
|
||||
[ [] 1 from
|
||||
[ i^ 2 + index
|
||||
superd if [ index join ]
|
||||
dup size 10 = if end ]
|
||||
nested join ]
|
||||
witheach
|
||||
[ i^ 2 + echo say " -> " echo cr ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue