fn main() { let mut count = 0; for t in 0..4 { for o in 0..10 { let d = t * 10 + o; if d > 30 { continue; } let h = o + t; if h >= 1 && h <= 12 { count += 1; } } } println!("{}", count); }