adventofcode-2017/day04/part1.js
2017-12-06 13:40:43 +00:00

4 lines
279 B
JavaScript

var input = require("fs").readFileSync("input.txt").toString();
var lines = input.split("\n").filter((a)=>(a)).map((line)=>(line.split(" ").map((a)=>(line.split(" ").filter((b)=>(b == a)).length == 1)).reduce((a, b)=>(a && b),true))).filter((a)=>(a));
console.log(lines.length);