Easy to understand...
Code

# Code
```cpp []
class Solution {
public:
    bool hasSameDigits(string s) {
        string ans = s;
        while (ans.size() != 2) {
            s = ans;
            ans = "";
            for (int i = 0; i + 1 < s.size(); i++) {
                int a = s[i] - 48;
                int b = s[i + 1] - 48;
                ans += ((a + b) % 10) + 48;
            }
        }
        return ans[0] == ans[1];
    }
};
```
['C++']