pub fn solve_n3(list: &[i32]) -> i32 {
    let (a, b, c) = list.iter().tuple_combinations()
        .find(|(a, b, c)| *a + *b + *c == 2020)
        .expect("Nothing found");

    a * b * c
}
// tag::solve_n3[]
/// Return the product of the three numbers in list that sum up to 2020.
///
/// # Examples
///
/// ```
/// let list: Vec<i32> = vec![1721, 979, 366, 299, 675, 1456];
/// let prod = mr_kaffee_2020_01::solve_n3(&list);
/// assert_eq!(prod, 241_861_950);
/// ```
:solve_n3[]
Return the product of the three numbers in list that sum up to 2020.
: solve_n3 [] Return the product of the three numbers in list that sum up to 2020 .
pub fn solve_n3(list: &[i32]) -> i32 {
    let (a, b, c) = list.iter().tuple_combinations()
        .find(|(a, b, c)| *a + *b + *c == 2020)
        .expect("Nothing found");
    a * b * c
}
pub fn solve_n3 ( list : & [ i32 ] ) -> i32 { let ( a , b , c ) = list . iter ( ) . tuple_combinations ( ) . find ( | ( a , b , c ) | * a + * b + * c == 2020 ) . expect ( " " ) ; a * b * c }
tag::solve_n3[]
Return the product of the three numbers in list that sum up to 2020.
tag :: solve_n3 [] Return the product of the three numbers in list that sum up to 2020 .
list
&[i32]
list
&[i32]
examples
None