Browse Source

fix indent in solution.rs

master
Coin de Gamma 2 years ago
parent
commit
962e5ef435
  1. 21
      001/solution.rs

21
001/solution.rs

@ -1,18 +1,15 @@
// https://projecteuler.net/problem=1
fn main() {
let mut sum = 0;
for n in 1..= 999 {
if n % 3 == 0 {
sum += n;
// println!("-- # {}", n);
}
if n % 5 == 0 && n % 3 != 0 {
// println!("++ # {}", n);
sum += n;
}
let mut sum = 0;
for n in 1..= 999 {
if n % 3 == 0 {
sum += n;
}
if n % 5 == 0 && n % 3 != 0 {
sum += n;
}
println!("{}", sum);
}
println!("{}", sum);
}

Loading…
Cancel
Save