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,23 @@
#determines if i, j, k are exclusive numbers
exclusive_numbers := proc(i, j, k)
if (i = j) or (i = k) or (j = k) then
return false;
end if;
return true;
end proc;
#outputs all possible combinations of numbers that statisfy given conditions
department_numbers := proc()
local i, j, k;
printf("Police Sanitation Fire\n");
for i to 7 do
for j to 7 do
k := 12 - i - j;
if (k <= 7) and (k >= 1) and (i mod 2 = 0) and exclusive_numbers(i,j,k) then
printf("%d %d %d\n", i, j, k);
end if;
end do;
end do;
end proc;
department_numbers();