---
description: '# Easy'
---

# 258. Add Digits

{% tabs %}
{% tab title="Python" %}
```python
class Solution:
    def addDigits(self, num: int) -> int:
        while num >= 10:
            res = 0
            while num != 0:
                res += num%10
                num = num//10
            num = res
            
        return num
```
{% endtab %}
{% endtabs %}
