Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Department-numbers/Jq/department-numbers-1.jq
Normal file
10
Task/Department-numbers/Jq/department-numbers-1.jq
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
def check(fire; police; sanitation):
|
||||
(fire != police) and (fire != sanitation) and (police != sanitation)
|
||||
and (fire + police + sanitation == 12)
|
||||
and (police % 2 == 0);
|
||||
|
||||
range(1;8) as $fire
|
||||
| range(1;8) as $police
|
||||
| range(1;8) as $sanitation
|
||||
| select( check($fire; $police; $sanitation) )
|
||||
| {$fire, $police, $sanitation}
|
||||
4
Task/Department-numbers/Jq/department-numbers-2.jq
Normal file
4
Task/Department-numbers/Jq/department-numbers-2.jq
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{fire: range(1;8), police: range(1;8), sanitation: range(1;8)}
|
||||
| select( .fire != .police and .fire != .sanitation and .police != .sanitation
|
||||
and .fire + .police + .sanitation == 12
|
||||
and .police % 2 == 0 )
|
||||
4
Task/Department-numbers/Jq/department-numbers-3.jq
Normal file
4
Task/Department-numbers/Jq/department-numbers-3.jq
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[range(1;8)]
|
||||
| combinations(3)
|
||||
| select( add == 12 and .[1] % 2 == 0)
|
||||
| {fire: .[0], police: .[1], sanitation: .[2]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue