Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# Input: a positive integer
# Output: the "middle-square"
def middle_square:
(tostring|length) as $len
| (. * .)
| tostring
| (3*length/4|ceil) as $n
| .[ -$n : $len-$n]
| if length == 0 then 0 else tonumber end;
# Input: a positive integer
# Output: middle_square, applied recursively
def middle_squares:
middle_square | ., middle_squares;
limit(5; 675248 | middle_squares)