Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Modular-arithmetic/Jq/modular-arithmetic-1.jq
Normal file
6
Task/Modular-arithmetic/Jq/modular-arithmetic-1.jq
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
def assert($e; $msg): if $e then . else "assertion violation @ \($msg)" | error end;
|
||||
|
||||
def is_integer: type=="number" and floor == .;
|
||||
|
||||
# To take advantage of gojq's arbitrary-precision integer arithmetic:
|
||||
def power($b): . as $in | reduce range(0;$b) as $i (1; . * $in);
|
||||
Loading…
Add table
Add a link
Reference in a new issue