CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Samuel.Repo
Submission time:2017-10-06 11:49:41 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.07 sdetails
#20.09 sdetails
#30.07 sdetails
#40.08 sdetails
#50.09 sdetails
#60.10 sdetails
#70.06 sdetails
#80.07 sdetails
#90.07 sdetails
#100.08 sdetails

Code

k = input()
k = list(k)
x = True
while x == True:
    x = False
    for i in k[:-1]:
        print(1)
        r = False
        try:
            for j in k[k.index(i)+1]:
                print(2)
                if i == j:
                    k.remove(j)
                    r = True
            if r == True:
                k.remove(i)
                x = True
        except:
            break
print ("".join(k))

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
1
2
1
2
1
...

Test 2

Verdict:

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
1
2
1
2
1
...

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
1
2
1
2
1
...

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
1
2
1
2
1
...

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
1
2
1
2
1
...

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
1
2
1
2
1
...

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
1
2
1
2
1
...

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
1
2
1
2
1
...

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
1
2
1
2
1
...

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
1
2
1
2
1
...