Public
Edited
Nov 18, 2022
1 star
Insert cell
Insert cell
Insert cell
function trans(sn, v) {
return (sn * v) % 20201227;
}
Insert cell
Insert cell
function findKey(values, keys) {
return values[0] === keys[0]
? values[1]
: findKey([trans(7, values[0]), trans(keys[1], values[1])], keys);
}
Insert cell
function part1(input) {
return findKey([1, 1], input);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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