Hackerrank Weekly 10 day 5