Also I'm retard and sum exists
This commit is contained in:
BIN
rust/1/main
BIN
rust/1/main
Binary file not shown.
@ -24,5 +24,5 @@ fn main() -> () {
|
||||
}
|
||||
}
|
||||
|
||||
println!("{}", top.iter().fold(0, |acc, el| { acc + el }));
|
||||
println!("{}", top.iter().sum::<i32>());
|
||||
}
|
||||
|
Reference in New Issue
Block a user