Fix. Adding Day02 stuff into main

Signed-off-by: Eoghan Conlon <git@eoghanconlon.ie>
This commit is contained in:
Eoghan Conlon 2024-12-09 15:01:14 +00:00
parent f755002b51
commit dfac234f44

View file

@ -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 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("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:"); System.out.println("\nDay 3:");
start = System.currentTimeMillis(); start = System.currentTimeMillis();
Day03 day03 = new Day03(); Day03 day03 = new Day03();