This commit is contained in:
Spectre 2024-12-02 23:14:39 +01:00
parent 294c0a8e62
commit e1ca0d5f61
76 changed files with 4607 additions and 204 deletions

11
src/input_data.rs Normal file
View file

@ -0,0 +1,11 @@
use std::{fs, io};
pub fn load_actual(year: usize, day: usize) -> io::Result<String> {
let path = format!("./data/{year}/day{:02}", day);
fs::read_to_string(path)
}
pub fn load_test(year: usize, day: usize) -> io::Result<String> {
let path = format!("./examples/{year}/day{:02}", day);
fs::read_to_string(path)
}