Maximizing the Magic Value

Problem Name:
Maximizing the Magic Value
Site:HackerEarth
Links:
Tags:
Problem setters: