Skip to content

Instantly share code, notes, and snippets.

@pingiun
Created August 7, 2015 19:24
Show Gist options
  • Save pingiun/1bade935f072cd743cbd to your computer and use it in GitHub Desktop.
Save pingiun/1bade935f072cd743cbd to your computer and use it in GitHub Desktop.
Problem 1 of the Euler project
//! Problem 1 of the Euler project
fn main() {
println!("{}", (1..1000).filter(|x| (x % 3 == 0 || x % 5 == 0)).fold(0, |a,b| a+b));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment