結果
問題 |
No.1617 Palindrome Removal
|
ユーザー |
|
提出日時 | 2021-07-22 21:51:22 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 454 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 82,616 KB |
実行使用メモリ | 75,204 KB |
最終ジャッジ日時 | 2024-07-17 17:23:50 |
合計ジャッジ時間 | 3,352 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 20 |
ソースコード
#!/usr/bin/env python3 # from typing import * def solve(s: str) -> int: if s != ''.join(reverse(s)): return len(s) if s == s[0] * len(s): if len(s) % 2 == 0: return 0 else: return 1 return len(s) - 2 # generated by oj-template v4.8.0 (https://github.com/online-judge-tools/template-generator) def main(): S = input() a = solve(S) print(a) if __name__ == '__main__': main()