Watch
1
0
Fork
You've already forked advent-of-code
0
This commit is contained in:
Jeremy Kaplan 2018-12-01 10:00:10 -08:00
commit 0c7a00d4fb
2 changed files with 1007 additions and 0 deletions

13
2018/src/main.rs Normal file
View file

@ -0,0 +1,13 @@
use std::str;
fn main() {
let input = include_str!("day1-input.txt");
let mut freq = 0;
for line in str::lines(input) {
match line.parse::<i32>() {
Ok(d) => freq += d,
Err(s) => println!("{}", s),
}
}
println!("{}", freq);
}