CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Pakasteporkkana
Submission time:2017-10-04 00:21:51 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.09 sdetails
#2ACCEPTED0.07 sdetails
#3ACCEPTED0.12 sdetails
#40.07 sdetails
#50.13 sdetails
#60.09 sdetails
#70.07 sdetails
#80.07 sdetails
#90.07 sdetails
#100.07 sdetails

Code

string = str(input())
list1 = list(string)
a = True
if len(list1) <= 1:
    a = False
while a:
    for i in range(len(list1)):
        b = False
        if len(list1) == i:
            break
        while list1[i] == list1[i+1]:
            list1.pop(i+1)
            b = True
            if len(list1)-1 == i:
                break
        if b:
            list1.pop(i)
            break
        if i == len(list1):
           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 11, in <module>
    while list1[i] == list1[i+1]:
IndexError: list index out of range

Test 2

Verdict: ACCEPTED

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Test 3

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 11, in <module>
    while list1[i] == list1[i+1]:
IndexError: list index out of range

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 11, in <module>
    while list1[i] == list1[i+1]:
IndexError: list index out of range

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 11, in <module>
    while list1[i] == list1[i+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 11, in <module>
    while list1[i] == list1[i+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 11, in <module>
    while list1[i] == list1[i+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 11, in <module>
    while list1[i] == list1[i+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 11, in <module>
    while list1[i] == list1[i+1]:
IndexError: list index out of range