hackerrank 30days solution code day 10