advent-of-code

Solutions for Advent of Code.
git clone git://git.amin.space/advent-of-code.git
Log | Files | Refs | LICENSE

commit 8d3e0f1e83d1d5f7414e5f1517939914828a211a
parent 514ce98384458c30e64c592334f13a0e4da9a07b
Author: amin <dev@aminmesbah.com>
Date:   Mon,  2 Dec 2019 08:00:27 +0000

Fix seaarch range to be inclusive

FossilOrigin-Name: 98a7f51a72ee68b8376a4b9d4d2cc1e6579447680b5fca8a2f5acdc653c0ce6e
Diffstat:
Mday02.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/day02.zig b/day02.zig @@ -15,11 +15,11 @@ pub fn main() !void { var noun: u32 = 0; var verb: u32 = 0; - search: while (noun < 99) : ({ + search: while (noun < 100) : ({ verb = 0; noun += 1; }) { - while (verb < 99) : (verb += 1) { + while (verb < 100) : (verb += 1) { if ((try get_program_output(allocator, program[0..program.len], noun, verb)) == 19690720) { break :search; }