Department numbers: Difference between revisions

(→‎{{header|Ruby}}: Added Ruby)
(→‎{{header|Python}}: Its a perm!)
Line 1,400:
c = 1
for p, f, s in permutations(range(1, 8), r=3):
if p != s and p != f and s != f and p + s + f == 12 and p % 2 == 0:
print(f"{c:>3}: {p:^6} {f:^4} {s:^10}")
c += 1
Anonymous user