Submission details
Task:Palindromi
Sender:Emerald0X2
Submission time:2025-10-27 15:00:03 +0200
Language:Python3 (PyPy3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.06 sdetails
#20.04 sdetails
#30.04 sdetails
#40.04 sdetails
#50.06 sdetails
#60.06 sdetails
#70.06 sdetails
#80.06 sdetails
#90.06 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)-1-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 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 2 (public)

Verdict:

input
saippuakauppias

correct output
0

user output
saippuakauppias

Test 3 (public)

Verdict:

input
a

correct output
0

user output
a

Test 4 (public)

Verdict:

input
aa

correct output
0

user output
aa

Test 5 (public)

Verdict:

input
abc

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 6 (public)

Verdict:

input
aybabtu

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 7 (public)

Verdict:

input
abacabaca

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 8 (public)

Verdict:

input
bbbbaaaababbbbbaabaaabaaaaabab...

correct output
23

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 9 (public)

Verdict:

input
acbaaabaabaddaccdcccbcdbdddacd...

correct output
38

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment

Test 10 (public)

Verdict:

input
uaqtmfftecryanvpshxsodjrllqnqp...

correct output
49

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    text[i] = text[len(text)-1]
TypeError: 'str' object does not support item assignment