Submission details
Task:Palindromi
Sender:Emerald0X2
Submission time:2025-10-27 14:58:34 +0200
Language:Python3 (PyPy3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.06 sdetails
#20.06 sdetails
#30.06 sdetails
#40.06 sdetails
#50.06 sdetails
#60.06 sdetails
#70.06 sdetails
#80.07 sdetails
#90.07 sdetails
#100.06 sdetails

Code

from math import ceil

text = input()

for i in range(ceil(len(text)/2)):
    if(text[i] != text[len(text)-i]):
        text[i] = text[len(text)-1]

print(text)

Test details

Test 1 (public)

Verdict:

input
datatahti

correct output
3

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 2 (public)

Verdict:

input
saippuakauppias

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 3 (public)

Verdict:

input
a

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 4 (public)

Verdict:

input
aa

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 5 (public)

Verdict:

input
abc

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 6 (public)

Verdict:

input
aybabtu

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 7 (public)

Verdict:

input
abacabaca

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 8 (public)

Verdict:

input
bbbbaaaababbbbbaabaaabaaaaabab...

correct output
23

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 9 (public)

Verdict:

input
acbaaabaabaddaccdcccbcdbdddacd...

correct output
38

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range

Test 10 (public)

Verdict:

input
uaqtmfftecryanvpshxsodjrllqnqp...

correct output
49

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 6, in <module>
    if(text[i] != text[len(text)-i]):
IndexError: string index out of range