RosettaCodeData/Task/Babbage-problem/Rust/babbage-problem-2.rs
2024-10-16 18:07:41 -07:00

5 lines
165 B
Rust

fn main() {
if let Some(n) = (1..).find(|x| x * x % 1_000_000 == 269_696) {
println!("The smallest number whose square ends in 269696 is {}", n)
}
}