Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function f(x, a) {
return ((x & 13) === 0) <= (((x & 40) !== 0) <= ((x & a) !== 0));
}
Insert cell
answer = solve()
Insert cell
function solve() {
for (let a = 1, isGood = true; a <= 1000; a++, isGood = true) {
for (let x = 1; x <= 1000; x++) {
if (!f(x, a)) {
isGood = false;
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