fn part2(nums: Vec<u32>) -> u32 {
    for x in 0..nums.len() {
        for y in 0..nums.len() {
            for z in x..nums.len() {
                if y == x && y == z {
                    continue;
                }
                if nums[x] + nums[y] + nums[z] == 2020 {
                    return nums[x] * nums[y] * nums[z];
                }
            }
        }
    }
    0
}
// Problem: Find the three numbers in a list that sum up to 2020
//          Take these three numbers and multiply them together.
//          Sample data in data.xmasdev
Find the three numbers in a list that sum up to 2020
Take these three numbers and multiply them together.
Find the three numbers in a list that sum up to 2020 Take these three numbers and multiply them together .
fn part2(nums: Vec<u32>) -> u32 {
    for x in 0..nums.len() {
        for y in 0..nums.len() {
            for z in x..nums.len() {
                if y == x && y == z {
                    continue;
                }
                if nums[x] + nums[y] + nums[z] == 2020 {
                    return nums[x] * nums[y] * nums[z];
                }
            }
        }
    }
    0
}
fn part2 ( nums : Vec < u32 > ) -> u32 { for x in 0 .. nums . len ( ) { for y in 0 .. nums . len ( ) { for z in x .. nums . len ( ) { if y == x && y == z { continue ; } if nums [ x ] + nums [ y ] + nums [ z ] == 2020 { return nums [ x ] * nums [ y ] * nums [ z ] ; } } } } 0 }
Problem: Find the three numbers in a list that sum up to 2020
Take these three numbers and multiply them together.
Problem : Find the three numbers in a list that sum up to 2020 Take these three numbers and multiply them together .
nums
Vec<u32>
nums
Vec<u32>