CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:nokka7
Submission time:2017-10-08 21:48:12 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.08 sdetails
#20.07 sdetails
#30.16 sdetails
#40.07 sdetails
#50.10 sdetails
#60.10 sdetails
#70.07 sdetails
#80.07 sdetails
#90.07 sdetails
#100.08 sdetails

Code

mjono = input("Merkkijono:")
while True:
    samoja = 1
    kohta = 0
    if len(mjono) == 0:
        break
    for i in range(0, len(mjono), 1):
        if (i == (len(mjono) - 1)):
            break
        if (mjono[i]) != (mjono[i + 1]):
            continue
        if (mjono[i]) == (mjono[i + 1]):
            kohta = i
            break
    for x in range(1, 1001, 1):
        if (x + kohta == (len(mjono))):
            break 
        if (mjono[kohta] == (mjono[kohta + x])):
            samoja += 1
            continue
        else:
            break
    if samoja == 1:
        break
    mjono = (mjono[:(kohta)] + mjono[(kohta + samoja):])
print(mjono)

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
Merkkijono:ABABABABABABABABABA...

Test 2

Verdict:

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
Merkkijono:

Test 3

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
Merkkijono:

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
Merkkijono:BAB

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
Merkkijono:ACDCACDADBADABACACD...

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
Merkkijono:TFHIJOGACDHMGVFJCME...

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
Merkkijono:GNLAHLYPRFCZKIKSJWA...

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
Merkkijono:PISHWMOTCZFRMYMOMYD...

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
Merkkijono:QUTPXAMODFXRONJODPG...

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
Merkkijono:POXHAHYEZTLYNFSLABO...