RosettaCodeData/Task/Babbage-problem/Zkl/babbage-problem.zkl

5 lines
294 B
Plaintext

// The magic number is 269696, so, starting about its square root,
// find the first integer that, when squared, its last six digits are the magic number.
// The last digits are found with modulo, represented here by the % symbol
const N=269696; [500..].filter1(fcn(n){ n*n%0d1_000_000 == N })