ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1201. Which Day Is It?

i think there is a problem with the leap years
Posted by Hasnae Rehioui 9 Aug 2007 01:04
I think they consider 1700, 1800, 1900 as being leap years whereas in the problem statement these years are not considered so.

http://www.timeanddate.com/calendar/index.html?year=1700&country=20
Re: i think there is a problem with the leap years
Posted by AlexF [USTU Frogs] 9 Aug 2007 09:19
1700, 1800, 1900 are not leap years;
year Y is leap
if
Y mod 4 = 0
if
Y mod 400 = 0
but
if Y mod 100 = 0 and Y mod 400 <> 0 then the year is not leap
Re: i think there is a problem with the leap years
Posted by Chmel_Tolstiy 9 Aug 2007 12:40
Your link lies.
This years are not leap.
http://en.wikipedia.org/wiki/Leap_year
Re: i think there is a problem with the leap years
Posted by Hasnae Rehioui 16 Aug 2007 07:32
yeah thx i know those years are not leap ones.
i was just a little confused with the january 1st 1600.
my solution got AC

thx anyway
Re: i think there is a problem with the leap years
Posted by Tural Neymanov 8 Jul 2008 16:42
In the Julian calendar every year that is divisible by 4 is leap. in Gregorian if year is century must be divisible by 400 to be leap. it is so because in every 400 years by julian 3 exess days(to be more certain 1 in 128 years). we began to use gregorian calendar after 1900 year so you see every year before 1918 if year is divisible by 4 then it is leap.
Re: i think there is a problem with the leap years
Posted by Chmel_Tolstiy 8 Jul 2008 17:45
Very interesting fact.