Submission details
Task:Palindromi
Sender:NicholasAhman
Submission time:2025-11-03 10:54:28 +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.06 sdetails
#90.07 sdetails
#100.07 sdetails

Code

import sys
def palindrome(y):
    x=list(y)
    end=len(x)-1
    steps=0
    for i in range(len(x)//2):
        if x[i]!=x[end-i]:
            x[i]=x[end-i]
            steps+=1
    
    return steps

print(palindrome(sys.argv[1]))

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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list 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 13, in <module>
    print(palindrome(sys.argv[1]))
IndexError: list index out of range