The question seems to be a simple one like calculating the sum of a series but the trick in the question is to calculate the required sum with PRECISION to obtain the required answer.

I didn’t complete that question but know the approach of it, as follows:

There were two subtasks of 50 points each:

1st: n<=(10^100), i.e. Googol number(very large)

but for that all u need is to just calculate the value of e^235(for worst case) that provides u the actual value with precision of e^x upto 101-102 decimal places and we can then easily calculate last term that is n*(e^n) and also the lower terms like (n-1)*(e^(n-1)). So, focus on calculating the value of e^235 with the given constraints of 1000 B size and that too fast (1 sec). U can opt for FFT (Fast Fourier Transform) to do so, so please refer it.