25 lines
792 B
Plaintext
25 lines
792 B
Plaintext
There is a highly organized city that has decided to assign a number to each of their departments:
|
|
::* police department
|
|
::* sanitation department
|
|
::* fire department
|
|
|
|
|
|
Each department can have a number between '''1''' and '''7''' (inclusive).
|
|
|
|
The three department numbers are to be unique (different from each other) and must add up to '''12'''.
|
|
|
|
The Chief of the Police doesn't like odd numbers and wants to have an even number for his department.
|
|
|
|
|
|
;Task:
|
|
Write a computer program which outputs <u>all</u> valid combinations.
|
|
|
|
|
|
Possible output (for the 1<sup>st</sup> and 14<sup>th</sup> solutions):
|
|
|
|
--police-- --sanitation-- --fire--
|
|
2 3 7
|
|
6 5 1
|
|
<br><br>
|
|
|