Sum Consecutive Identical Digits
Given a string of digits, repeatedly sum any consecutive identical digits until there are no more consecutive duplicates.
For example:
Input: 99823
- 99 becomes 18 → 18823
- 88 becomes 16 → 116...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
