Sad powers

Problem Name:
Sad powers
Site:CodeForces
Links:
Tags:
Problem setters: