1
0
This commit is contained in:
2019-12-02 14:27:20 +01:00
parent 4a43239aa1
commit d23c3f45be
61 changed files with 344 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
<Query Kind="Expression" />
File
.ReadAllLines(Path.Combine(Path.GetDirectoryName(Util.CurrentQueryPath), @"02_input.txt"))
.Select(s => (s.GroupBy(p => p).Any(g => g.Count() == 2) ? 1 : 0, s.GroupBy(p => p).Any(g => g.Count() == 3) ? 1 : 0))
.Select(p => new[] { p.Item1, p.Item2 })
.Aggregate((a, b) => new[] { a[0] + b[0], a[1] + b[1] })
.Aggregate((a, b) => a * b)