this post was submitted on 16 Nov 2024
4 points (75.0% liked)
Advent of Code
289 readers
1 users here now
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
AOC answers do need to be exact though, right? That implies integers only IMO, and I think that's all I've ever seen... Not certain though.
They could use fixed point numbers instead of floating point ones. Fixed point is exact
Yep, you're right. But then puzzles would need to spend words explaining that detail, and participants would need to worry about how their language deals with non-integer numbers... Javascript users for example would have an annoying experience. It's a snag that you could avoid just by having integer-only problems.
AoC usually avoids being fiddly about details of the actual tech-- You seldom see problems refer to data types or structures. The intent is to keep them open to as many programming languages (and other computation methods) as possible. It makes sense to me to stick to integers for that.