← Problem book: C
Lesson 45 of 96 · 15 XP
GCD: Euclid's algorithm
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
You are given two positive integers. Print their greatest common divisor.
Example
Input:
12 18
Output:
6
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.