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-09-01T07:33:11.190Z

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