HackerRank Java Datatypes problem solution - TheCScience