Countdown: Difference between revisions
→{{header|Quorum}}: Replace french variables names with english variables names
(Add Quorum exact solution (no search of the "as close as possible" solution)) |
(→{{header|Quorum}}: Replace french variables names with english variables names) |
||
Line 40:
DateTime datetime
number start = datetime:GetEpochTime()
List<integer>
Solution(952,
number stop = datetime:GetEpochTime()
output stop-start + " ms"
end
action Solution(integer
if
return false
end
Iterator<integer> it0 =
repeat while it0:HasNext()
integer n0 = it0:Next()
List<integer>
Iterator<integer> it1 =
repeat while it1:HasNext()
integer n1 = it1:Next()
List<integer>
integer res = 0
List<integer>
res = n0 + n1
if res =
output res + " = " + n0 + " + " + n1
return true
Line 84:
res = n0 * n1
if res =
output res + " = " + n0 + " * " + n1
return true
Line 93:
if n0 > n1
res = n0 - n1
if res =
output res + " = " + n0 + " - " + n1
return true
Line 101:
elseif n1 > n0
res = n1 - n0
if res =
output res + " = " + n1 + " - " + n0
return true
Line 112:
if n0 mod n1 = 0
res = n0 / n1
if res =
output res + " = " + n0 + " / " + n1
return true
Line 122:
if n1 mod n0 = 0
res = n1 / n0
if res =
output res + " = " + n1 + " / " + n0
return true
|