HackerEarth Random Generator problem solution - TheCScience