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

Show all messages Hide all messages

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)
>'Ralf'
Every time someone has problems with this task, it's someone who can't type text from a picture properly.
Thank you. (Cnacu6o, Bbl Mou repou!)

Edited by author 24.10.2017 04:00