Skip to content

Commit 31f4bed

Browse files
committed
2025 day12
1 parent 47b0a32 commit 31f4bed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

2025/day12/.bench

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"Lines":[{"Name":"Part 1","N":3043,"NsPerOp":373346,"AllocedBytesPerOp":0,"AllocsPerOp":0,"MBPerS":0,"Measured":1,"Ord":0}],"Measured":1}
1+
{"Lines":[{"Name":"Part 1","N":3277,"NsPerOp":366164,"AllocedBytesPerOp":0,"AllocsPerOp":0,"MBPerS":0,"Measured":1,"Ord":0}],"Measured":1}

2025/day12/part1.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func doPartOne(input string) int {
4747
totalpresentarea += utils.Atoi(numStr) * presents[i]
4848
}
4949

50-
// Check if sleigh has enough space
51-
if totalpresentarea <= area && area > totalpresentarea+(totalpresentarea/5) {
50+
// Check if sleigh has enough space (area > 120% of presents)
51+
if area > totalpresentarea+(totalpresentarea/5) {
5252
ans++
5353
}
5454
}

0 commit comments

Comments
 (0)