基本的欧几里德算法:$\gcd(a, b) = \gcd(a, b-a)$

Interactive · 2 questions

Suppose that you have two distinct positive integers aa and bb with a>ba\gt b, and you would like to find their greatest common factor; that is, the largest positive integer nn such that n∣an \mid a and n∣bn \mid b.

You could solve this problem in a relatively straightforward manner by computing the prime factorization of each number, and by taking the minimum exponent of each prime number.

However, this system is problematic.

Why might this be?

Choose all correct answers

Learn a clever approach

Every problem comes with a worked solution, so even one you cannot crack shows you a new way to think. These are real problems from the AMC 8, AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems