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

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

WA 10 and I have no idea what could be wrong
Послано MishaRash 21 июл 2015 22:33
I wrote the program on Python 3.4. The output for '30 1 2012' is
mon........2....9...16...23..[30]
tue........3...10...17...24...31
wed........4...11...18...25.....
thu........5...12...19...26.....
fri........6...13...20...27.....
sat........7...14...21...28.....
sun...1....8...15...22...29.....
It should be right, but I still got WA.
I think there is too few data about the output format in the problem statement. For example, I had to go to forum to get that there must be 4 spaces between first and second coulumn and no space in the end of the second line in this case.
Re: WA 10 and I have no idea what could be wrong
Послано MishaRash 25 июл 2015 00:56
I rewrote the program on C (GCC) and found the problem.
On '1 1 1600' I got
mon........3...10...17...24
tue........4...11...18...25
wed........5...12...19...26
thu........6...13...20...27
fri........7...14...21...28
sat.[.1]...8...15...22...29
sun...2....9...16...23...30
My program calculated number of weeks in the month wrong. When I solved this, I got AC.
Probably the 10th test is not '30 1 2012' any more.