CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:Naat
Submission time:2017-10-07 13:50:09 +0300
Language:Python2
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.07 sdetails
#2ACCEPTED0.08 sdetails
#30.91 sdetails
#40.94 sdetails
#50.92 sdetails
#60.78 sdetails
#70.72 sdetails
#80.89 sdetails
#90.71 sdetails
#100.94 sdetails

Code

s=raw_input()
p=0
c=""
while c!=s:
    c=s
    for x in range(len(s)):
        if p == s[x]:
            
            be=s[:x-1]
            en=s[x:]

            while True:
                if len(en)==0:
                    break
                if en[0]==p:
                    en=en[1:]
                else:
                    break
            s=be+en
            break
            
        p=s[x]
            
print(s)

Test details

Test 1

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
ABABABABABABABABABABABABABABAB...

Test 2

Verdict: ACCEPTED

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
(empty)

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
(empty)

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
(empty)

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
(empty)

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
(empty)

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
(empty)

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
(empty)