2024
This commit is contained in:
parent
294c0a8e62
commit
e1ca0d5f61
76 changed files with 4607 additions and 204 deletions
11
src/input_data.rs
Normal file
11
src/input_data.rs
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue