------
## 最终结论
```python
def greatest_common_divisor(a: int, b: int) -> int:
    while b:
        a, b = b, a % b
    return a
```