题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { let str = line + "00000000"; for (let i = 0; i < str.length-8; i += 8) { console.log(str.substr(i,8)); } });