Task: | Merkkijono |
Sender: | _Serinaz_ |
Submission time: | 2017-10-11 13:49:52 +0300 |
Language: | Python3 |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.07 s | details |
#2 | WRONG ANSWER | 0.09 s | details |
#3 | WRONG ANSWER | 0.07 s | details |
#4 | WRONG ANSWER | 0.07 s | details |
#5 | WRONG ANSWER | 0.08 s | details |
#6 | WRONG ANSWER | 0.08 s | details |
#7 | WRONG ANSWER | 0.07 s | details |
#8 | WRONG ANSWER | 0.07 s | details |
#9 | WRONG ANSWER | 0.09 s | details |
#10 | WRONG ANSWER | 0.08 s | details |
Code
#merkkijono def merkkijono(string): lista = list(string) k=0 for i in range(len(lista)-2): if k>=len(lista)-2: break if lista[k] == lista[k+1]: j=k+1 viimeinen = 0 while lista[k]==lista[j]: viimeinen = j j += 1 if j==len(lista): break viimeinen += 1 lista[k:viimeinen] = [] else: k+=1 print(k) print("".join(str(x) for x in lista)) jono = input() merkkijono(jono)
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
ABABABABABABABABABABABABABABAB... |
user output |
---|
1 2 3 4 5 ... |
Test 2
Verdict: WRONG ANSWER
input |
---|
AABBAABBAABBAABBAABBAABBAABBAA... |
correct output |
---|
(empty) |
user output |
---|
0 0 0 0 0 ... |
Test 3
Verdict: WRONG ANSWER
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
(empty) |
user output |
---|
1 2 3 4 5 ... |
Test 4
Verdict: WRONG ANSWER
input |
---|
BBABABBBBBAABBBABABABBBBAAABAB... |
correct output |
---|
BAB |
user output |
---|
0 1 2 3 3 ... |
Test 5
Verdict: WRONG ANSWER
input |
---|
ACDCBBACDBBBACAACBBDBADBAABABA... |
correct output |
---|
ACDCACDADBADABACACDCADADABABCA... |
user output |
---|
1 2 3 4 4 ... |
Test 6
Verdict: WRONG ANSWER
input |
---|
EETFHIJOGACDHMGVFJCMETMZDEITTR... |
correct output |
---|
TFHIJOGACDHMGVFJCMETMZDEIROTET... |
user output |
---|
0 1 2 3 4 ... |
Test 7
Verdict: WRONG ANSWER
input |
---|
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB... |
correct output |
---|
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE... |
user output |
---|
1 1 2 3 4 ... |
Test 8
Verdict: WRONG ANSWER
input |
---|
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS... |
correct output |
---|
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK... |
user output |
---|
1 2 3 4 5 ... |
Test 9
Verdict: WRONG ANSWER
input |
---|
QUVVTPXAMWWODFXRONJODPGBTCISGM... |
correct output |
---|
QUTPXAMODFXRONJODPGBTCISGMVRBW... |
user output |
---|
1 2 2 3 4 ... |
Test 10
Verdict: WRONG ANSWER
input |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
correct output |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
user output |
---|
1 2 3 4 5 ... |