From 3275e9c3630f83c46391b9ccc3b85c34e0a0405f Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Sun, 18 Aug 2024 23:03:54 -0500 Subject: [PATCH] Correct month range --- java/src/main/java/euler/p0019.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/main/java/euler/p0019.java b/java/src/main/java/euler/p0019.java index 423a30ae..19e96ba7 100644 --- a/java/src/main/java/euler/p0019.java +++ b/java/src/main/java/euler/p0019.java @@ -31,7 +31,7 @@ public class p0019 implements IEuler { public Object answer() { byte answer = 0; for (short x = 1901; x < 2001; x++) { - for (byte y = 0; y < 12; y++) { + for (byte y = 1; y < 13; y++) { if (LocalDate.of(x, y, 1).getDayOfWeek() == DayOfWeek.SUNDAY) { answer++; }