CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:viktor
Submission time:2017-10-04 22:04:59 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.07 sdetails
#2ACCEPTED0.10 sdetails
#30.23 sdetails
#40.07 sdetails
#50.08 sdetails
#6ACCEPTED0.10 sdetails
#7ACCEPTED0.07 sdetails
#8ACCEPTED0.11 sdetails
#9ACCEPTED0.07 sdetails
#10ACCEPTED0.09 sdetails

Code

from itertools import groupby
f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
print(f(input("")))

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)

Error:
Traceback (most recent call last):
  File "input/code.py", line 3, in <module>
    print(f(input("")))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) == len(s) else f(k))("".join(a for a, b in groupby(s) if len(list(b)) == 1))
  File "input/code.py", line 2, in <lambda>
    f = lambda s: (lambda k: k if len(k) ==...

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
ABA

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
ACDCACDADBADABACACDCADADABABCA...

Test 6

Verdict: ACCEPTED

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

Test 7

Verdict: ACCEPTED

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

Test 8

Verdict: ACCEPTED

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

Test 9

Verdict: ACCEPTED

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

Test 10

Verdict: ACCEPTED

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...