chal finally did on own like fully own no bugs :D but must try hard bahut hai krna
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    string digitSum(string s, int k) {\n\n        string temp=s;\n        int c=0;\n        int num=0;\n        string calc="";\n\n        while(temp.size()>k)\n        {\n            calc="";\n            num=0;\n            c=0;\n\n            for(int i=0;i<temp.size();i++)\n            {\n                num+=temp[i]-\'0\';\n                c++;\n\n                if(c==k || i==temp.size()-1)\n                {\n                    c=0;\n                    calc+=to_string(num);\n                    num=0;\n\n                }\n            }\n            temp=calc;\n\n\n        }\n        \n        return temp;\n    }\n};\n```
['C++']