Data update

This commit is contained in:
Ingy döt Net 2023-12-16 21:33:55 -08:00
parent 35bcdeebf8
commit 74c69a0df6
2427 changed files with 31826 additions and 3468 deletions

View 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

View 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 ]