Every periodic continued fraction can be prepresented by a number of the form where p, q, and d are all integers with d>0, , and d not a perfect square. Given the cointued fraction sequence, both the beginning sequence and cyclic part of the sequence [front, cyclic], output the unique p, q, and d (in reduced form). p and q can both be negative.

Solution Stats

10 Solutions

3 Solvers

Last Solution submitted on Jul 10, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...