CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Kurns
Submission time:2017-10-02 13:37:22 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.07 sdetails
#2ACCEPTED0.08 sdetails
#30.07 sdetails
#40.06 sdetails
#50.06 sdetails
#60.10 sdetails
#70.07 sdetails
#80.07 sdetails
#90.09 sdetails
#100.06 sdetails

Code

userInput = input()
userList = []
finalString = ""

for x in range(0, len(userInput)):
    userList.append(userInput[x])

if userList[0] != userList[1]:
    finalString += userList[0]

for z in range(1, len(userList)):
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
        #print("z-1 on", userList[z-1], " z on ", userList[z], "z+1 on", userList[z+1])
        finalString += userList[z]


print(finalString)

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 2

Verdict: ACCEPTED

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
ACDCACDACCDBADBBABACACDCADADAB...

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 12, in <module>
    if userList[z] != userList[z-1] and userList[z] != userList[z+1]:
IndexError: list index out of range