結果
問題 |
No.588 空白と回文
|
ユーザー |
|
提出日時 | 2018-06-17 21:23:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 80 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-30 16:36:04 |
合計ジャッジ時間 | 2,593 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 14 |
ソースコード
from collections import deque from sys import stdin, stdout input = lambda: stdin.readline().rstrip() println = stdout.write def main(): s1 = input() s2 = deque(s1[::-1]) l = len(s1) ans = 0 for _ in range(l): cnt = 0 for i in range(l): if s1[i] == s2[i]: cnt += 1 ans = max(ans, cnt) s2.rotate() print(ans) main()