fn get_count(color: &str) -> usize { match color { "NONE" => 16, _ => 16 - color.split(",").count() } } fn main() { let mut r: String = String::new(); std::io::stdin().read_line(&mut r).ok(); let r: &str = r.trim(); let mut g: String = String::new(); std::io::stdin().read_line(&mut g).ok(); let g: &str = g.trim(); let mut b: String = String::new(); std::io::stdin().read_line(&mut b).ok(); let b: &str = b.trim(); let r_num = get_count(r); let g_num = get_count(g); let b_num = get_count(b); println!("{}", r_num * g_num * b_num * r_num * g_num * b_num); }