This file contains 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 input_file = std::env::args().nth(1).expect("Input filename missing"); | |
let input = std::fs::read_to_string(input_file).expect("Error reading file"); | |
let numbers = input | |
.lines() | |
.next() | |
.unwrap() | |
.split(',') | |
.map(|num| num.parse().expect("invalid number")) |