Submission #998517

#TimeUsernameProblemLanguageResultExecution timeMemory
998517Ibrohim0704Palindromes (APIO14_palindrome)Cpython 3
0 / 100
1074 ms3676 KiB
a=str(input()) def palin(s): if s==s[::-1]: return True return False def cou(s,el): ret=0 for i in range(len(s)): c=0 for j in range(len(el)): if i+j<len(s): if s[i+j]==el[j]: c+=1 if c==len(l): ret+=1 return ret ans=[] for i in range(len(a)): for j in range(len(a)): l=a[i:j+1] k=palin(l) if k: ans.append(len(l)*(cou(a,l))) print(max(ans))
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...