...สื่อสาร (สอบ)ทานง่าย ฉายประโยชน์
บ่โกรธ ผู้มัก ซักถาม
เข้าใจ ไขแจ้ง กระจ่างความ
ไป่ปล่อย รอยหนาม คาใจ
Euclidean algorithm can be used to find the greatest common divisor of a = 1071 and b = 462.
To begin, multiples of 462 are subtracted from 1071 until the remainder is less than 462.
Two such multiples can be subtracted (q0 = 2), leaving a remainder of 147:
1071 = 2 × 462 + 147.
Then multiples of 147 are subtracted from 462 until the remainder is less than 147.
Three multiples can be subtracted (q1 = 3), leaving a remainder of 21:
462 = 3 × 147 + 21.
Then multiples of 21 are subtracted from 147 until the remainder is less than 21.
Seven multiples can be subtracted (q2 = 7), leaving no remainder:
147 = 7 × 21 + 0.
Since the last remainder is zero,
the algorithm ends with 21 as the greatest common divisor of 1071 and 462.
07 เมษายน 2016 11:34 : ข้อความนี้ถูกแก้ไขแล้ว 1 ครั้ง, ครั้งล่าสุดโดยคุณ share
|