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