HackerEarth Milly and Chocolates IV problem solution - TheCScience