From f396302693c95ba4b08a9122190b072b26d1e607 Mon Sep 17 00:00:00 2001 From: x0x7 Date: Wed, 4 Dec 2024 18:10:58 -0500 Subject: [PATCH] Add 2024/day4/part2.js --- 2024/day4/part2.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 2024/day4/part2.js diff --git a/2024/day4/part2.js b/2024/day4/part2.js new file mode 100644 index 0000000..2c2607c --- /dev/null +++ b/2024/day4/part2.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + + +var input = require('fs').readFileSync(process.argv[2]||'input.txt','utf8').split('\n').filter(i=>i); + +var width = input.length; + +var sum=0; +for(var i=1;i