Public
Edited
Dec 31, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function editor(input) {
let str = input;
while (/555|888/g.test(str)) {
str = str.replace(/555/, "8");
str = str.replace(/888/, "55");
}
return str;
}
Insert cell
minLength = {
let input = "8".repeat(301);
let result = editor(input);
while (result !== "58" && result !== "85") {
input += "8";
result = editor(input);
}
return input.length;
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more