Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function transferLiquid(start, target)
- local output2 = 0
- local output10 = 0
- while (not start == target) do
- output2 = output2 + 10^start
- output10 = output10 + 2^start
- start = start + 1
- end
- if (string.sub(""..output2,1,5) == "11111") then
- output10 = output10 -31
- end
- if (string.sub(""..output2,6,10) == "11111")then
- output10 = output10 -992
- end
- return output10
- end
- print(transferLiquid(read(), read()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement