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 2023. Donald is a postman

I publish the correct code, but the timus does not accept it, so that everything is normal.
Posted by Bushmanov 23 Oct 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.
Posted by Oleg Baskakov 23 Oct 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.
Posted by Bushmanov 24 Oct 2017 03:59
Thank you. (Cnacu6o, Bbl Mou repou!)

Edited by author 24.10.2017 04:00