GCD using Loop Problem

GCD using Loop Problem — ExecCode Easy DSA Practice

Solve the GCD using Loop problem on ExecCode. Free online easy DSA practice in Numbers & Math Logic. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve GCD using Loop. Your task is to compute the required answer and return GCD. a b on one line.

Examples

Input {"a": 10, "b": 5}; Output 5. Input {"a": 100, "b": 25}; Output 25. Input {"a": 12, "b": 18}; Output 6

Constraints

1 <= a, b <= 10^9

Practice GCD using Loop free on ExecCode. Browse DSA problems, topic map, and placement guides.