Greatest common divisor

Write a program that computes the greatest common divisor of two
numbers.

Input

Input consists of two strictly positive natural numbers a and b.

Output

Print the greatest common divisor of a and b.

Observation

Although the solution to this exercise does not need to be very
efficient, it should not be too slow.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:33:17.203Z

© Jutge.org, 2006–2026.
https://jutge.org
