HackerRank Prime Checker in java problem solution - TheCScience