Public
Edited
Dec 31, 2022
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function f(x, y, a) {
return (x - 30 < a && 15 - y < a) || x * (y + 3) > 60;
}
Insert cell
answer = solve()
Insert cell
function solve() {
for (let a = 1, isGood = true; a <= 100; a++, isGood = true) {
for (let x = 1; x <= 100; x++) {
for (let y = 1; y <= 100; y++) {
if (!f(x, y, a)) {
isGood = false;
break;
}
}
if (!isGood) break;
}
if (isGood) return a;
}
}
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