|
|
вернуться в форумI publish the correct code, but the timus does not accept it, so that everything is normal. 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. >'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. Thank you. (Cnacu6o, Bbl Mou repou!) Edited by author 24.10.2017 04:00 |
|
|