100% easy solution 
IntuitionApproachComplexity
Time complexity:O(n)

Space complexity:O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    string digitSum(string s, int k) {

        while(s.length() > k){
        string temp = "";
       
        for(int i = 0; i < s.length(); i += k){
             int num  = 0;
            for(int j = i; j < i+ k && j < s.length(); j++){
                num += (s[j] - '0'); 
            }
            //  string temp1 = str(num);
             temp += to_string(num); // int to string 
        }
        s = temp;
            
        }
        return s;
    }
};
```
['Two Pointers', 'C++']