HackerEarth Naruto's Punishment problem solution - TheCScience