Easy C++ Code Beats 100%
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```\nclass Solution {\npublic:\n    vector<string> divideString(string s, int k, char fill) {\n        vector<string> ans;\n        int k1=0,siz=s.length();\n        string m="";\n        for(auto i=0;i<siz;i++)\n        {\n            m+=s[i];\n            k1+=1;\n            if(m.length()==k)\n            {\n                ans.push_back(m);\n                m="";\n            }\n            if(i==siz-1 && k1%k!=0)\n            ans.push_back(m);\n        }\n    int as=ans.size()-1,as1=k-ans[as].size();\n    if(ans[as].size()!=k)\n    {\n      string st(as1,fill); \n      ans[as]+=st;\n    }\n    return ans;\n    }\n};\n```
['C++']