We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I was also surprised regarding TLE using C#. It turns out there are many ways to solve that using C#. Importantly, you have to consider that converting BigInteger to String using ToString is slow since it has to perform division operation on the big integer everytime to get a single digit. Therefore, following approaches work mentioned in the code here on github works great.
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
I was also surprised regarding TLE using C#. It turns out there are many ways to solve that using C#. Importantly, you have to consider that converting BigInteger to String using ToString is slow since it has to perform division operation on the big integer everytime to get a single digit. Therefore, following approaches work mentioned in the code here on github works great.
Acknowledgement for the idea to following