HackerEarth Mike and LMS problem solution - TheCScience