Esempio n. 1
0
 public override object SolveOne()
 {
     return(IntRows
            .Where(x => IntRows.Contains(2020 - x))
            .Select(x => x * (2020 - x))
            .First());
 }
Esempio n. 2
0
 public override object SolveTwo()
 {
     return(IntRows
            .Where(x => IntRows.Exists(y => IntRows.Contains(2020 - x - y)))
            .Aggregate(1, (x, y) => x * y));
 }