Destroying balls

Problem Name:
Destroying balls
Site:HackerEarth
Links:
Tags:
Problem setters: