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,36 @@
program Department_numbers;
{$APPTYPE CONSOLE}
uses
System.SysUtils;
var
i, j, k, count: Integer;
begin
writeln('Police Sanitation Fire');
writeln('------ ---------- ----');
count := 0;
i := 2;
while i < 7 do
begin
for j := 1 to 7 do
begin
if j = i then
Continue;
for k := 1 to 7 do
begin
if (k = i) or (k = j) then
Continue;
if i + j + k <> 12 then
Continue;
writeln(format(' %d %d %d', [i, j, k]));
inc(count);
end;
end;
inc(i, 2);
end;
writeln(#10, count, ' valid combinations');
readln;
end.