Created
February 11, 2016 16:04
-
-
Save polachok/702c0e8707469e90eaaa to your computer and use it in GitHub Desktop.
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
fn main() { | |
let mut sum: i64 = 0; | |
for _ in 0..200 { | |
sum = 0; | |
let mut x = vec![]; | |
for i in 0..1000000 { | |
x.push(i); | |
} | |
let mut y = vec![]; | |
for i in 0..1000000-1 { | |
y.push(x[i] + x[i+1]); | |
} | |
let mut i = 0; | |
while i < 1000000 { | |
sum += y[i]; | |
i += 100; | |
} | |
} | |
println!("{}", sum); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment