結果

問題 No.1617 Palindrome Removal
ユーザー keijakkeijak
提出日時 2021-07-23 17:37:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 168 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 9,976 KB
最終ジャッジ日時 2023-09-25 16:02:29
合計ジャッジ時間 2,314 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
9,932 KB
testcase_02 AC 31 ms
9,748 KB
testcase_03 AC 31 ms
9,820 KB
testcase_04 AC 31 ms
9,828 KB
testcase_05 AC 28 ms
9,428 KB
testcase_06 AC 20 ms
9,864 KB
testcase_07 AC 18 ms
9,244 KB
testcase_08 AC 15 ms
7,784 KB
testcase_09 AC 15 ms
7,784 KB
testcase_10 AC 33 ms
9,756 KB
testcase_11 AC 30 ms
9,684 KB
testcase_12 AC 32 ms
9,888 KB
testcase_13 AC 33 ms
9,976 KB
testcase_14 AC 15 ms
7,748 KB
testcase_15 AC 15 ms
7,820 KB
testcase_16 AC 15 ms
7,840 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,780 KB
testcase_21 AC 16 ms
7,900 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    s = input()
    n = len(s)
    if s != s[::-1]:
        return n
    ss = set(s)
    if len(ss) == 1:
        return 0
    return n - 2

print(solve())
0