RosettaCodeData/Task/Babbage-problem/Crystal/babbage-problem.cr

8 lines
119 B
Crystal
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
# brute force approach
i = Math.isqrt(269_696)
i -= 1 unless i.even?
while i*i % 1_000_000 != 269_696
i += 2
end
p i