HackerRank Java Output Formatting problem solution - TheCScience