Sunday, June 2, 2013

project euler problem 198

Ambiguous Numbers

This is probably the most confusing problem in all PE problems. So many people are confused by the definition of amibuous number and cannot get the correct answer. The following sentence need to be carefully read and interpreted. 

"We shall call a real number x ambiguous, if there is at least one denominator bound for which x possesses two best approximations."

A lot of hint and helpful message are given here. After we understand what "trivial" means, the rest are not so difficult. 

Actually, there is some related problems to this one. The problem number is between 50 to 80. If the simpler problem can be solved efficiently, this one can be done similarly. My code finished in 0.2 second.

No comments:

Post a Comment