← run

he-013

1.000
1/1 tests· basic

Proposed solution

```python
def greatest_common_divisor(a: int, b: int) -> int:
    while b:
        a, b = b, a % b
    return a
```

Test output (stdout)

.                                                                        [100%]
1 passed in 0.01s
System prompt
You are an expert programmer. Solve the task exactly as specified. Output your solution as fenced code blocks using the required file name(s) and the exact function/type signatures requested. Prefer correctness; do not include prose outside code unless asked.