-
[백준] 25501. 재귀의 귀재코테 준비/구현 2023. 1. 18. 02:48
def recursion(s,l,r): global count if l>=r: return 1 elif s[l]!=s[r]: return 0 else: count+=1 return recursion(s,l+1,r-1) def isPalindrome(s): return recursion(s,0,len(s)-1) t=int(input()) for i in range(t): s=input() count=1 print(isPalindrome(s),count)
'코테 준비 > 구현' 카테고리의 다른 글
[프로그래머스] k진수에서 소수 개수 구하기 (0) 2023.01.23 [프로그래머스] 귤 고르기 (0) 2023.01.23 [프로그래머스] 예상대진표 (0) 2023.01.18 [프로그래머스] N개의 최소공배수 (0) 2023.01.17 [백준] 1193. 분수 찾기 (0) 2023.01.14