diff --git a/004/solution.rs b/004/solution.rs index 0bf1eb4..cc45c00 100644 --- a/004/solution.rs +++ b/004/solution.rs @@ -1,30 +1,16 @@ -//use std::iter::zip; - fn is_polindrome(n: i32) -> bool { let s = n.to_string(); for (p, q) in s.chars().zip(s.chars().rev()) { - // println!("-{}-{}-", p, q); if q != p { return false; } } return true; } fn main() { - - //let nnnn = 999 * 999 * 999; - //let m_nnn = u32::MAX; - //println!("{} vs {}", nnnn, m_nnn); let n = 999; - - //let mut i = n; - //let mut j = n; - //let mut k = n; - let mut best_i = 1; let mut best_j = 1; - let mut best_poli = 1; - for i in 100..=n { for j in 100..=n { let m = i * j; @@ -38,6 +24,4 @@ fn main() { } } println!("{}*{}={}", best_i, best_j, best_poli); - //let p = is_polindrome(999 * 999 * 999); - //println!("{}", p); }