Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
Greatest common factor
How would I find the greatest common factor of two integers?
1 ответ
+ 5
Wikipedia is always a good idea if you are looking for algorithms. In this case I would recommend using the Euclidean algorithm.