Simple CPP Solution
Code

# Code
```cpp []
class Solution {
public:
    bool hasSameDigits(string s) {
        while(s.length()>2)
            {
                string curr="";
                for(int i=0;i<s.length()-1;i++){
                    int sum=(s[i]-'0'+s[i+1]-'0')%10;
                    curr+=(sum+'0');
                }
                s=curr;
            }
        return s[0]==s[1];
    }
};
```
['C++']