Power with Combinatorics(HARD)

Problem Name:
Power with Combinatorics(HARD)
Site:Spoj
Links:
Tags:
Problem setters: