• + 8 comments

    Can someone please point to the technique that is used for this problem? I have a submission that works for small values of N but breaks down hopelessly for large values .. I could try to use log , but I have no idea how to calculate the lower n digits in that case. I took a look at the editorial but was unable to make out from the code what mathematical technique was used to solve this problem.