We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8164eee commit b5f110aCopy full SHA for b5f110a
src/projecteuler/problem0019.ts
@@ -18,17 +18,15 @@ export function problem0019(
18
const leap = (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0 ? 1 : 0;
19
daysInMonth.FEBRUARY = 28 + leap;
20
21
- Object.entries(daysInMonth).forEach(([month, days], index) => {
22
- console.debug(`Month(${index}): ${month} | days: ${days}`);
23
-
+ for (const days of Object.values(daysInMonth)) {
24
accumulatedRemainder += days % 7;
25
if (accumulatedRemainder % 7 === _dayOfWeek) {
26
if (y <= _sinceYear) {
27
excess += 1;
28
}
29
resultCount += 1;
30
31
- });
+ }
32
33
34
console.log(`result ${String(resultCount)}`);
0 commit comments