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.

# Project Euler #66: Diophantine equation

# Project Euler #66: Diophantine equation

#### Sort by

recency

#### |

#### 11 Discussions

#### |

Please Login in order to post a comment

here is my python 3 100/- Point Solution

Is there a way for you to see the time taken by your code in each test case? I am a noobie and I like to know how fast the computer can crunch the numbers.

I finally got my solution to work. It was taking too long on the last two cases. Turns out that manual calculation was faster than using python's fractions library.

Wikipedia has a long article about this problem: https://en.wikipedia.org/wiki/Pell%27s_equation

when D = 61, it looks like the minimal x is 1766319049. It is really too crazy to iterator until this digit