You are given a string s consisting of numerical digits.
You perform the following operation repeatedly until the length of s becomes
Create a new string of length s.length i is calculated as (s[i] + s[i + 1]) modulo
Replace s with this newly created string.
Return true if the two remaining digits in s are identical, or false otherwise.
Constraints:
s.length
s consists of only digits.
You are given a string s consisting of numerical digits.
You perform the following operation repeatedly until the length of s becomes
Create a new string of length s.length i is calculated as (s[i] + s[i + 1]) modulo
Replace s with this newly created string.
Return true if the two remaining digits in s are identical, or false otherwise.
Constraints:
s.length
s consists of only digits.