<<BEAT 100% SOLUTIONS || BEGINNER FRIENDLY SOLUTIONS>>
PLEASE UPVOTE MECode
# **PLEASE UPVOTE ME**

# Code
```cpp []
class Solution {
public:
    bool hasSameDigits(string s) {
        while(s.size()>2){
            string a;
            for(int i=0;i<s.size()-1;i++){
                int x=((s[i]-'0')+(s[i+1]-'0'))%10;
                a.push_back(x);
            }
            s=a;
        }
        if(s[0]==s[1]) return true;
        else return false;
    }
};
```
['C++']