https://www.acmicpc.net/problem/1259
result=[]
while(1):
inp=input()
if inp == "0":
break
inp=list(inp)
length = int(len(inp)/2)
if len(inp)%2==0:
front = inp[0:length]
back = inp[length:]
else:
front = inp[0:length]
back = inp[length+1:]
if front == back[::-1]:
result.append("yes")
else:
result.append("no")
for i in result:
print(i)
'자기개발👨💻 > 코딩 알고리즘' 카테고리의 다른 글
[python] 백준 1731 추론 (0) | 2020.08.29 |
---|---|
[python] 백준 1547 공 (0) | 2020.08.29 |
[python] 백준 1264 모음의 개수 (0) | 2020.08.29 |
[python] 백준 2386 도비의 영어 공부 (0) | 2020.08.29 |
[python] 백준 2588 곱셈 (0) | 2020.08.29 |
[python] 백준 1789 블랙잭 (0) | 2020.08.29 |