From c653c05a0651465713bf6440677bef0a72286fb3 Mon Sep 17 00:00:00 2001 From: Eoghan Conlon Date: Mon, 9 Dec 2024 13:03:33 +0000 Subject: [PATCH] Refactor main to match format used Signed-off-by: Eoghan Conlon --- src/Main.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Main.java b/src/Main.java index c3df515..0167df9 100644 --- a/src/Main.java +++ b/src/Main.java @@ -24,6 +24,13 @@ public class Main { int d1_p2_answer = day01.Part2(); long day01_p2 = System.currentTimeMillis() - start; + System.out.printf("Day 1 init took %dms", day01_init); + System.out.printf("Part 1 sample is: %d (%dms)\n", sample_d1_p1_answer, day01_p1_sample); + System.out.printf("Part 1 answer is: %d (%dms)\n", d1_p1_answer, day01_p1); + 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 3:"); start = System.currentTimeMillis(); Day03 day03 = new Day03(); long day03_init = System.currentTimeMillis() - start; @@ -36,12 +43,6 @@ public class Main { int day03_p1 = day03.part1(); long day03_p1_t = System.currentTimeMillis() - start; - System.out.printf("Day 1 init took %dms", day01_init); - System.out.printf("Part 1 sample is: %d (%dms)\n", sample_d1_p1_answer, day01_p1_sample); - System.out.printf("Part 1 answer is: %d (%dms)\n", d1_p1_answer, day01_p1); - 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.printf("Day 3 init took %dms\n", day03_init); System.out.printf("Day 3 part 1 (sample): %d (%dms)\n", day03_p1_sample, day03_p1_sample_t); System.out.printf("Day 3 part 2 : %d (%dms)", day03_p1, day03_p1_t);