Skip to content

Instantly share code, notes, and snippets.

@polachok
Created February 11, 2016 16:04
Show Gist options
  • Save polachok/702c0e8707469e90eaaa to your computer and use it in GitHub Desktop.
Save polachok/702c0e8707469e90eaaa to your computer and use it in GitHub Desktop.
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