Fixed input loading thing

This commit is contained in:
Jan 2020-12-05 11:35:52 +01:00
parent 3ca850a5df
commit d153054abb
8 changed files with 8 additions and 8 deletions

View file

@ -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 => {

View file

@ -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 => {

View file

@ -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 = []

View file

@ -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 = []

View file

@ -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;

View file

@ -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 = [

View file

@ -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 = {

View file

@ -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 = {