in contests/arc010/arc010_2.rs [6:27]
fn main() {
input! {
N: usize,
S: [String; N]
}
let month_max_day = [31, 29, 31, 30, 31, 30, 31, 31, 29, 31, 30, 31];
let month_first_youbi = [0, 3, 4, 0, 2, 5, 0, 3, 6, 1, 4, 6];
let mut max_length_rest = 2;
for s_ in S {
let s: String = s_.clone();
let md: Vec<&str> = s.split("/").collect();
let m = md[0].parse::<u64>().unwrap();
let d = md[1].parse::<u64>().unwrap();
println!("{} {}", m, d);
let mut youbi = (month_first_youbi[m as usize - 1] + d - 1) % 7;
if youbi == 5 || youbi == 1 {
max_length_rest = 3;
}
}
}