Created
August 7, 2015 19:24
-
-
Save pingiun/1bade935f072cd743cbd to your computer and use it in GitHub Desktop.
Problem 1 of the Euler project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! 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