题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
const rl = require("readline").createInterface({ input: process.stdin }); var iter = rl[Symbol.asyncIterator](); const readline = async () => (await iter.next()).value; void (async function () { // Write your code here const line = await readline(); const loop = (str) => { const num = Math.ceil(str.length / 8); if (num === 1) { console.log(str.padEnd(8, "0")); } if (num > 1) { console.log(str.substring(0, 8)) loop(str.substring(8)); } }; loop(line) })();#huawei##华为##华为od机试##华为od机#