ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1201. Какой сегодня день?

i think there is a problem with the leap years
Послано Hasnae Rehioui 9 авг 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
Послано AlexF [USTU Frogs] 9 авг 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
Послано Chmel_Tolstiy 9 авг 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
Послано Hasnae Rehioui 16 авг 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
Послано Tural Neymanov 8 июл 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
Послано Chmel_Tolstiy 8 июл 2008 17:45
Very interesting fact.