1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
pub fn main() { let txt = std::fs::read_to_string("./input/day12.txt").unwrap(); let input = txt .lines() .map(|s| s.split(" ").collect::<Vec<_>>()) .collect::<Vec<Vec<_>>>(); for line in input { let s = line[0]; let n = line[1] .split(",") .map(|s| s.parse::<u64>().unwrap()) .collect::<Vec<_>>(); println!("{} {:?}", s, n); } }