c++ most easy and optimal beats 100% 
IntuitionApproachComplexity
Time complexity:

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

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

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

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

# Code
```cpp []
//ve
class Solution {
public:
    vector<string> divideString(string s, int k, char fill) {
    int n=s.size();
    vector<string>ans;
    int numberofsubstr=(n+k-1)/k;
    for(int i=0;i<n;i+=k){
        ans.push_back(s.substr(i,k));
    }   
    //check number of charactes in fill
    while(ans.back().size()!=k) ans.back().push_back(fill);
    return ans; 
    }
};
```
['C++']