We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prime Dates
- Discussions
Prime Dates
Prime Dates
Sort by
recency
|
70 Discussions
|
Please Login in order to post a comment
Python 3 Note: C# is once again an empty template, just remove the choice of language at this point. 2nd Note: Gregorian Calendar Rules dictate years evenly divisible by 100 and not 400 are not leap years, seems illogical to make clearly uncommon knowledge be required for "programming exercises" but oh well.
GO (gives the right answers, but it doesnt accept)
.
My output for the first test, I am not sure what I am doing wrong, lucky_count: 1 | concat: 1222025 lucky_count: 2 | concat: 1922025 lucky_count: 3 | concat: 2622025 lucky_count: 4 | concat: 732025 lucky_count: 5 | concat: 1432025 lucky_count: 6 | concat: 2132025 lucky_count: 7 | concat: 2832025 lucky_count: 8 | concat: 242025 lucky_count: 9 | concat: 942025 9
I agree with others, that they shouldn't have assumed the rules about leap years is common knowledge. However, I think the worst part about this challenge is that the stated constraints aren't sufficient! There's nothing preventing Date1 from being greater (later) than Date2! What's worse (at least on the Python3 version), it's all just shoved into an infinite loop
Leap years rule: a. Divisible by 4: if it's divisible by 4 b. Century years: if it's divisible by 400