ABX01 - EDITORIAL

We can use "set stl " also

O(no of digits) is O(log N).

I was trying to use recursive version of fast exponentiation algorithm but getting TLE on 2nd and 3rd subtask. Can anyone help me regarding same? Please upvote this answer so that I can ask queries :slight_smile:

https://www.codechef.com/viewsolution/16740009

1 Like

Superfast - 0s

And it works with arbitrarily large integers!

@eugalt u really squeezed up !!!

1 Like