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

Обсуждение задачи 2023. Дональд-почтальон

I publish the correct code, but the timus does not accept it, so that everything is normal.
Послано Bushmanov 23 окт 2017 04:18
Hello. Task number is 2023.
Timus flatly refuses to accept. He had a lot of tests, but he did not find any flaws. Maybe someone will tell me, otherwise I'll kill myself tomorrow.

n = int(input())
zn = [1]
k=0
y = 0
sh1 = ('Alice', 'Ariel', 'Aurora', 'Phil', 'Peter', 'Olaf', 'Phoebus', 'Ralf', 'Robin')
sh2 = ('Bambi', 'Belle', 'Bolt', 'Mulan', 'Mowgli', 'Mickey', 'Silver', 'Simba', 'Stitch')
for j in range (n):
    i = input()
    if i in sh1:
        zn.append (1)
    elif i in sh2:
        zn.append (2)
    else:
        zn.append (3)
    n-=1
for k in range (len(zn)):
    y+= abs ((int(zn [k-1]))-int(zn [k]))
lop = y-zn[-1]+1
print (lop)
Re: I publish the correct code, but the timus does not accept it, so that everything is normal.
Послано Oleg Baskakov 23 окт 2017 11:24
>'Ralf'
Every time someone has problems with this task, it's someone who can't type text from a picture properly.
Re: I publish the correct code, but the timus does not accept it, so that everything is normal.
Послано Bushmanov 24 окт 2017 03:59
Thank you. (Cnacu6o, Bbl Mou repou!)

Edited by author 24.10.2017 04:00