The minimum sum

Problem Name:
The minimum sum
Site:HackerEarth
Links:
Tags:
Problem setters: