mirror of
https://github.com/Aviortheking/advent-of-code.git
synced 2025-04-22 02:42:14 +00:00
8 lines
179 B
TypeScript
8 lines
179 B
TypeScript
import fs from 'fs'
|
|
|
|
const input = fs.readFileSync(__dirname + '/input.txt').toString()
|
|
.split('')
|
|
|
|
console.log(
|
|
"Result:", input.reduce((p, c) => p + (c === '(' ? 1 : -1), 0)
|
|
) |