extremely easy, 100% optimized golang 24ms, 8.38mb (beats 95%)
Approachsimple CRT + lucas theorumCode
# Approach
simple CRT + lucas theorum

# Code
```golang []
func hasSameDigits(s string) bool {
        n := len(s);
        m := n - 2;

        mDigits := make([]int, 10);
        mSize := 0;
        temp := m;
        if temp == 0 {
                mDigits[mSize] = 0;
                mSize++;
        } else {
                for temp > 0 {
                        mDigits[mSize] = temp % 5;
                        mSize++;
                        temp /= 5;
                }
        }

        small := [5][5]int{
                {1, 0, 0, 0, 0},
                {1, 1, 0, 0, 0},
                {1, 2, 1, 0, 0},
                {1, 3, 3, 1, 0},
                {1, 4, 1, 4, 1},
        };
        diff := 0;
        for j := 0; j <= m; j++ {
                res5 := 1;
                x := j;
                for i := 0; i < mSize; i++ {
                        d := x % 5;
                        x /= 5;
                        a := mDigits[i];
                        if d > a {
                                res5 = 0;
                                break;
                        }
                        res5 = (res5 * small[a][d]) % 5;
                }

                c2 := 0;
                if (m & j) == j {
                        c2 = 1;
                }

                coeff := res5;
                if (res5&1) != c2 {
                        coeff += 5;
                }

                delta := int(s[j] - '0') - int(s[j+1] - '0');
                diff = (diff + coeff * delta) % 10;
                if diff < 0 {
                        diff += 10;
                }
        }

        return diff == 0;
}
```
['Go']