CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Pakasteporkkana
Submission time:2017-10-03 22:58:15 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.07 sdetails
#20.09 sdetails
#30.08 sdetails
#40.06 sdetails
#50.09 sdetails
#60.06 sdetails
#70.07 sdetails
#80.08 sdetails
#90.07 sdetails
#100.06 sdetails

Code

#input string
string = "ABCDDCBA"
list1 = list(string)
a = True
while(a):
    for i in xrange(len(list1)-1):
        x = i
        b = False
        while(list1[x] == list1[x+1]):
            list1.pop(x+1)
            b = True
            if(len(list1) == 1):
                break
        if b:
            list1.pop(x)
            break
        if i == len(list1)-2:
            a = False
    if len(list1)-1 == 0:
        a = False
string = "".join(list1)
print(string)

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' is not defined

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' 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 6, in <module>
    for i in xrange(len(list1)-1):
NameError: name 'xrange' is not defined