結果
| 問題 | No.273 回文分解 |
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2021-01-18 00:20:27 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 2,000 ms |
| + 583µs | |
| コード長 | 300 bytes |
| 記録 | |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-10-02 10:59:44 |
| 合計ジャッジ時間 | 3,080 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
def is_palindrome(s):
return s == s[::-1]
S = input()
result = 0
for i in range(len(S)):
for j in range(i + 1, len(S) + 1):
if i == 0 and j == len(S):
continue
if not is_palindrome(S[i:j]):
continue
result = max(result, j - i)
print(result)
c-yan