Solve 2024-04

This commit is contained in:
2024-12-04 10:57:06 +01:00
parent 07b6299f4b
commit 7af53bbec0
4 changed files with 127 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2024-04', () => {
const testInput = `MMMSXXMASM
MSAMXMSMSA
AMXSXMAAMM
MSAMASMSMX
XMASAMXAMM
XXAMMXXAMA
SMSMSASXSS
SAXAMASAAA
MAMMMXMMMM
MXMXAXMASX`;
it('first', () => {
expect(solveFirst(testInput)).toBe(18);
});
it('second', () => {
expect(solveSecond(testInput)).toBe(9);
});
});