Sum of Powers (#540) - Azerbaijan Computing Olympiad