https://www.acmicpc.net/problem/1259
5613번: 계산기 프로그램
입력의 각 줄에는 숫자와 +, -, *, /, =중 하나가 교대로 주어진다. 첫 번째 줄은 수이다. 연산자의 우선 순위는 생각하지 않으며, 입력 순서대로 계산을 하고, =가 주어지면, 그때까지의 결과를 출��
www.acmicpc.net
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 |