Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Department-numbers/Wren/department-numbers.wren
Normal file
17
Task/Department-numbers/Wren/department-numbers.wren
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
System.print("Police Sanitation Fire")
|
||||
System.print("------ ---------- ----")
|
||||
var count = 0
|
||||
for (h in 1..3) {
|
||||
var i = h * 2
|
||||
for (j in 1..7) {
|
||||
if (j != i) {
|
||||
for (k in 1..7) {
|
||||
if ((k != i && k != j) && (i + j + k == 12) ) {
|
||||
System.print(" %(i) %(j) %(k)")
|
||||
count = count + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
System.print("\n%(count) valid combinations")
|
||||
Loading…
Add table
Add a link
Reference in a new issue