Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Tau-function/Jq/tau-function-1.jq
Normal file
8
Task/Tau-function/Jq/tau-function-1.jq
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def count(s): reduce s as $x (0; .+1);
|
||||
|
||||
# For pretty-printing
|
||||
def nwise($n):
|
||||
def n: if length <= $n then . else .[0:$n] , (.[$n:] | n) end;
|
||||
n;
|
||||
|
||||
def lpad($len): tostring | ($len - length) as $l | (" " * $l)[:$l] + .;
|
||||
2
Task/Tau-function/Jq/tau-function-2.jq
Normal file
2
Task/Tau-function/Jq/tau-function-2.jq
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[range(1;101) | count(divisors)]
|
||||
| nwise(10) | map(lpad(4)) | join("")
|
||||
Loading…
Add table
Add a link
Reference in a new issue