結果
| 問題 | No.273 回文分解 |
| コンテスト | |
| ユーザー |
tookunn_1213
|
| 提出日時 | 2016-01-25 23:58:39 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| 記録 | |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 77,056 KB |
| 最終ジャッジ日時 | 2025-12-03 19:05:40 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 3 |
ソースコード
S = raw_input() ans = 0 for i in range(len(S) - 1): left,right = 1,1 cnt = 1 while i - left >= 0 and i + right < len(S) and S[i - left] == S[i + right]: cnt += 2 left += 1 right += 1 if cnt == len(S):cnt = 1 ans = max(ans,cnt) for i in range(len(S) - 1): left,right = i,i + 1 cnt = 0 while left >= 0 and right < len(S) and S[left] == S[right]: cnt += 2 left -= 1 right += 1 if cnt == len(S):cnt = 1 ans = max(ans,cnt) print ans
tookunn_1213