This commit is contained in:
2023-11-29 15:57:17 +01:00
parent 4a876daa71
commit 58df0a8bbe
7 changed files with 111 additions and 12 deletions

View File

@@ -6,9 +6,7 @@ unless_exists: true
from os.path import join, dirname
# Day <%= day %>
# Common
# Setup
def read_input(filename):
@@ -17,7 +15,25 @@ def read_input(filename):
return f.read().strip()
test = read_input('test.txt')
data = read_input('input.txt')
TEST = read_input('test.txt')
INPUT = read_input('input.txt')
# Task
def part_a(raw: str):
pass
def part_b(raw: str):
pass
# Running
print('1.')
print(part_a(TEST))
print(part_a(INPUT))
print('\n2.')
print('1.')
print(part_b(TEST))
print(part_b(INPUT))

View File

@@ -0,0 +1,24 @@
---
to: <%= dir %>/typescript/main.ts
unless_exists: true
---
import fs from 'node:fs'
import path from 'node:path'
// SETUP
const INPUT = fs.readFileSync(path.join(__dirname, '../input.txt'), 'utf-8').trim()
const TEST = fs.readFileSync(path.join(__dirname, '../test.txt'), 'utf-8').trim()
// TASK
function partA(input: string) {}
function partB(input: string) {}
console.log('Part A:')
partA(TEST)
partA(INPUT)
console.log('Part B:')
partA(TEST)
partB(INPUT)