Division and Modulo
We pre-initialize the result with filled k-size strings.\n\nThen, we place i-th character into res[i / k][i % k].\n\nC++\ncpp\nvector<string> divideString(strin
We pre-initialize the result with filled `k`-size strings.\n\nThen, we place `i`-th character into res`[i / k][i % k]`.\n\n**C++**\n```cpp\nvector<string> divideString(string s, int k, char fill) {\n    vector<string> res((s.size() + k - 1) / k, string(k, fill));\n    for (int i = 0; i < s.size(); ++i)\n        res[i / k][i % k] = s[i];\n    return res;\n}\n```
['C']