Fixed input loading thing
This commit is contained in:
parent
3ca850a5df
commit
d153054abb
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
arr.forEach(num => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
arr.forEach(num => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
let invalid = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
let invalid = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
let trees = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const arr = file.split('\n');
|
||||
|
||||
const speeds = [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const passports = file.split('\n\n');
|
||||
|
||||
const fieldNames = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require('fs');
|
||||
const file = fs.readFileSync('./input.txt').toString('utf-8');
|
||||
const file = fs.readFileSync(__dirname + '/input.txt').toString('utf-8');
|
||||
const passports = file.split('\n\n');
|
||||
|
||||
const fieldNames = {
|
||||
|
|
Loading…
Reference in a new issue