Euler Sum- Probable approach

After heaving goggling, I found a link in which approach of solving sum of floor functions is given. Due to lack of time I was unable to code it.

Had anyone solved with this approach and getting all test cases partially or fully passed?

Here q=1 and p=euler number

I got 50 points using this approach.

Here is my solution in Python.

1 Like

I used the approach.

  1. 50 points: I stored 200 digits of e and used this to get the answer.

  2. 100 points: I used this algorithm(link) to get the first 8000 digits of e.

I used continued fraction , found a rational number p/q to approximate e and used approach in this link. My code: link text