CodeLab Academy 📞 9936 6696
← List Python · Level 9: Functions and dicts Code · 90 points ← #822 #824 →

#823. Recursion: GCD

You get a and b. Find their greatest common divisor (GCD) with a recursive function. ### Input a b (1 ≤ a, b ≤ 10⁹). ### Output Answer.

Examples

Input
3050394 1411540
Output
2
Input
716208 1033724
Output
4

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!