Platform
Resources
Pricing
Sign in
Get started
Philippe Rigovanov
math & informatics teacher
Workspace
Fork
Public
Informatics
By
Philippe Rigovanov
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
editor
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
minLength
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML