1
0
This commit is contained in:
2026-02-04 11:15:03 +08:00
commit 8b20a5dd21
125 changed files with 4177 additions and 0 deletions

18
problems/p1/src/main.rs Normal file
View File

@@ -0,0 +1,18 @@
fn multiples(input: u32) -> u32 {
let mut sum = 0;
for i in 1..input {
if i % 3 == 0 {
sum += i;
continue;
}
if i % 5 == 0 {
sum += i;
continue;
}
}
sum
}
fn main() {
println!("10: {}", multiples(1000));
}