Skip to content

Instantly share code, notes, and snippets.

View francois-roseberry's full-sized avatar

François Roseberry francois-roseberry

  • Ingeno
  • Quebec, Canada
View GitHub Profile
@francois-roseberry
francois-roseberry / functions.js
Created December 14, 2023 15:03
Advent of code 2023 - 13 décembre
function solve(lines) {
console.log(lines)
const blocks = splitBlocks(lines)
console.log('# of blocks: ', blocks.length)
var total = 0;
for (var i = 0; i < blocks.length; i++) {
const summary = summarizeBlock(blocks[i])
total += summary
console.log('Block', i+1, ': summary=', summary, ', total=', total)
}