HackerRank Java If-Else problem solution - TheCScience