| Task: | Palindromi |
| Sender: | lukarantalainen |
| Submission time: | 2025-10-27 18:38:53 +0200 |
| Language: | Python3 (CPython3) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.02 s | details |
| #2 | WRONG ANSWER | 0.02 s | details |
| #3 | WRONG ANSWER | 0.02 s | details |
| #4 | WRONG ANSWER | 0.02 s | details |
| #5 | WRONG ANSWER | 0.02 s | details |
| #6 | WRONG ANSWER | 0.02 s | details |
| #7 | WRONG ANSWER | 0.02 s | details |
| #8 | WRONG ANSWER | 0.02 s | details |
| #9 | WRONG ANSWER | 0.02 s | details |
| #10 | WRONG ANSWER | 0.02 s | details |
Code
s = input()
length = len(s)
charlist = list(s)
revlist = charlist[::-1]
def change_char(half):
for i in range(int(half)):
revchar = revlist[i]
if revchar != charlist[i]:
revlist[i] = charlist[i]
else:
pass
return revlist[::-1]
if length%2 == 0:
half = length/2
print(change_char(half))
else:
half = length/2-1
print(change_char(half))
Test details
Test 1 (public)
Verdict: WRONG ANSWER
| input |
|---|
| datatahti |
| correct output |
|---|
| 3 |
| user output |
|---|
| ['d', 'a', 't', 'a', 't', 'a',... |
Test 2 (public)
Verdict: WRONG ANSWER
| input |
|---|
| saippuakauppias |
| correct output |
|---|
| 0 |
| user output |
|---|
| ['s', 'a', 'i', 'p', 'p', 'u',... |
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| a |
| correct output |
|---|
| 0 |
| user output |
|---|
| ['a'] |
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aa |
| correct output |
|---|
| 0 |
| user output |
|---|
| ['a', 'a'] |
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abc |
| correct output |
|---|
| 1 |
| user output |
|---|
| ['a', 'b', 'c'] |
Test 6 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aybabtu |
| correct output |
|---|
| 2 |
| user output |
|---|
| ['a', 'y', 'b', 'a', 'b', 'y',... |
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abacabaca |
| correct output |
|---|
| 2 |
| user output |
|---|
| ['a', 'b', 'a', 'c', 'a', 'b',... |
Test 8 (public)
Verdict: WRONG ANSWER
| input |
|---|
| bbbbaaaababbbbbaabaaabaaaaabab... |
| correct output |
|---|
| 23 |
| user output |
|---|
| ['b', 'b', 'b', 'b', 'a', 'a',... |
Test 9 (public)
Verdict: WRONG ANSWER
| input |
|---|
| acbaaabaabaddaccdcccbcdbdddacd... |
| correct output |
|---|
| 38 |
| user output |
|---|
| ['a', 'c', 'b', 'a', 'a', 'a',... |
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| uaqtmfftecryanvpshxsodjrllqnqp... |
| correct output |
|---|
| 49 |
| user output |
|---|
| ['u', 'a', 'q', 't', 'm', 'f',... |
