java easy to understand
\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int l=0;\n        if(s.length()%k==0)\n        {\n            l=s.le
```\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int l=0;\n        if(s.length()%k==0)\n        {\n            l=s.length()/k;\n        }\n        else\n        {\n            l=s.length()/k+1;\n        }\n        String[] str=new String[l];\n        for(int i=0;i<s.length();i=i+k)\n        {\n            String st="";\n            for(int j=i;j<i+k && j<s.length();j++)\n            {\n                st+=s.charAt(j);\n            }\n            str[i/k]=st;\n        }\n        if(str[str.length-1].length()<k)\n        {\n            String ss=str[str.length-1];\n            for(int i=str[str.length-1].length();i<k;i++)\n            {\n                ss+=fill;\n            }\n            str[str.length-1]=ss;\n        }\n        return str;\n    }\n}\n```
[]