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
1 Like