From dfac234f4494bb0b2c532742078b4a24cec68249 Mon Sep 17 00:00:00 2001 From: Eoghan Conlon Date: Mon, 9 Dec 2024 15:01:14 +0000 Subject: [PATCH] Fix. Adding Day02 stuff into main Signed-off-by: Eoghan Conlon --- src/Main.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/Main.java b/src/Main.java index 567b617..1d8c4fb 100644 --- a/src/Main.java +++ b/src/Main.java @@ -30,6 +30,33 @@ public class Main { System.out.printf("Part 2 sample answer is: %d (%dms)\n", sample_d1_p2_answer, day01_p2_sample); System.out.printf("Part 2 answer is: %d (%dms)\n", d1_p2_answer, day01_p2); + System.out.println("\nDay 2:"); + start = System.currentTimeMillis(); + Day02 day02 = new Day02(); + long day02_init = System.currentTimeMillis() - start; + + start = System.currentTimeMillis(); + int d2_p1_sample = day02.part1Sample(); + long day02_p1_sample = System.currentTimeMillis() - start; + + start = System.currentTimeMillis(); + int d2_p1 = day02.part1(); + long day02_p1 = System.currentTimeMillis() - start; + + start = System.currentTimeMillis(); + int d2_p2_sample = day02.part2Sample(); + long day02_p2_sample = System.currentTimeMillis() - start; + + start = System.currentTimeMillis(); + int d2_p2 = day02.part2(); + long day02_p2 = System.currentTimeMillis() - start; + + System.out.printf("Day 2 init took %dms\n", day02_init); + System.out.printf("Part 1 sample = %d (%dms)\n", d2_p1_sample, day02_p1_sample); + System.out.printf("Part 1 answer = %d (%dms)\n", d2_p1, day02_p1); + System.out.printf("Part 2 sample = %d (%dms)\n", d2_p2_sample, day02_p2_sample); + System.out.printf("Part 2 answer = %d (%dms)\n", d2_p2, day02_p2); + System.out.println("\nDay 3:"); start = System.currentTimeMillis(); Day03 day03 = new Day03();