CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Kurns
Submission time:2017-10-02 18:20:05 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.06 sdetails
#20.08 sdetails
#30.08 sdetails
#40.09 sdetails
#50.07 sdetails
#60.05 sdetails
#70.08 sdetails
#80.07 sdetails
#90.06 sdetails
#100.07 sdetails

Code

userInput = input()
allList = []
listString = ""
editing = True

for z in range(0, len(userInput)):
    allList.append(userInput[z])

while editing:
    
    if len(allList) < 2:
        editing = False
        break

    start = 0
    end = 0
    x = -1

    while x < len(allList):
        x += 1
        #print(x)
        #print(len(allList))
        if allList[x] == allList[x+1]: #Jos kirjain on sama kuin seuraava kirjain
            start = x
            end = x+1
            n = end + 1
            while allList[n] == allList[start]: #N aloittaa looppaamisen end+1, vie endin paikalleen
                end += 1
                n += 1
            for x in range(0, end-start+1):
                del allList[start]
        else:
            editing = false
                     
for k in range(0, len(allList)):
    listString += allList[k]
        
print(listString)

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 2

Verdict:

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    while allList[n] == allList[start]: #N aloittaa looppaamisen end+1, vie endin paikalleen
IndexError: list index out of range

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 33, in <module>
    editing = false
NameError: name 'false' is not defined