Adding solution for problem 1 in lua.
Adding solution for problem 2 in lua.