题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
let input = readline();
let next = input;
if (input.length % 8 != 0) {
for (let i = 0; i < 8 - (input.length % 8); i++) {
next = next + "0";
}
}
for (let i = 0; i < next.length; i++) {
if (i % 8 == 7 && i != 0) {
console.log(next.substr(i - 7, 8));
}
}
