Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Department-numbers/Lua/department-numbers.lua
Normal file
12
Task/Department-numbers/Lua/department-numbers.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
print( "Fire", "Police", "Sanitation" )
|
||||
sol = 0
|
||||
for f = 1, 7 do
|
||||
for p = 1, 7 do
|
||||
for s = 1, 7 do
|
||||
if s + p + f == 12 and p % 2 == 0 and f ~= p and f ~= s and p ~= s then
|
||||
print( f, p, s ); sol = sol + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
print( string.format( "\n%d solutions found", sol ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue