Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
understood the mistake
of the julian calendar year % 100 != 0 - superfluous
really don't understand why...
Hello my code passes tests with years > 1752
and where < 1752 are lost for several days (1, 3 ... somewhere around 10)
in tests, the rule of the julian calendar?
(year % 4 == 0) and (year % 100 != 0) ?
Or am I misunderstanding something, please tell me
i would like at some time in The Future whith god help to be able to come with this kind of simple solutions
there was no year
0in either the Gregorian and the Julian calendar. the years go from
-1 BC(before Christ) to
+1 AD(anno Domini). I would suggest removing the mention of year
0in the description, and updating the random tests accordingly
C random tests can generate dates from September 3 - September 13 1752
that should be an issue, i checked the RNG in C and it can indeed generate such dates. raising
no, this is the point, there was no divisible-by-100 exception in the Julian calendar
Ah maybe I get it, you check if l - w != 0, and then add those numbers and multiply them by bitshifting them once. otherwise you're returning the square. Cool solution!
Can you perhaps explain your answer?
Description says : "leap years were on every year divisible by 4, without the exception of years divisible by 100."
is either bad English, or should be: "leap years were on every year divisible by 4, with the exception of years divisible by 100."
HOWEVER, the true Julian calendar had leap years every 4 years, except for some historic period where it was irregular.
Furthermore, it's stated that year 0 (which technically didn't exist at all on the Julian calendar!) is a leap year, although it's both divisible by 4 and 100.
C version of this kata needs to be updated per https://github.com/codewars/content-issues/wiki/List-of-C-Kata-to-Update
Loading more items...