結果

問題 No.1617 Palindrome Removal
ユーザー minimumminimum
提出日時 2021-07-22 21:29:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 173 bytes
コンパイル時間 685 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 131,692 KB
最終ジャッジ日時 2023-09-24 15:43:16
合計ジャッジ時間 4,470 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 171 ms
128,772 KB
testcase_01 AC 182 ms
131,564 KB
testcase_02 AC 172 ms
129,220 KB
testcase_03 AC 169 ms
128,696 KB
testcase_04 AC 175 ms
131,320 KB
testcase_05 AC 159 ms
120,564 KB
testcase_06 AC 115 ms
112,904 KB
testcase_07 AC 105 ms
104,604 KB
testcase_08 AC 70 ms
70,976 KB
testcase_09 AC 71 ms
71,264 KB
testcase_10 AC 169 ms
127,596 KB
testcase_11 AC 157 ms
120,928 KB
testcase_12 AC 177 ms
131,580 KB
testcase_13 AC 176 ms
131,692 KB
testcase_14 AC 73 ms
71,240 KB
testcase_15 AC 71 ms
71,148 KB
testcase_16 AC 71 ms
71,132 KB
testcase_17 AC 71 ms
70,976 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 69 ms
70,952 KB
testcase_21 AC 70 ms
70,912 KB
testcase_22 AC 71 ms
71,096 KB
testcase_23 AC 70 ms
71,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x = list(input())
y = list(reversed(x))

if x != y:
    print(len(x))
else:
    if x.count(x[0]) == len(x):
        print(- (len(x) % 2))
    else:
        print(len(x) - 2)
0