题解 | #点击消除#
点击消除
https://www.nowcoder.com/practice/8d3643ec29654cf8908b5cf3a0479fd5
def xiaochu(s):
l = ''
for i in s:
l = l + i
if len(l)>1 and l[-1]==l[-2]:
l = l[:-2]
return l if l else 0
print(xiaochu(input()))
#你的秋招进展怎么样了#
l = ''
for i in s:
l = l + i
if len(l)>1 and l[-1]==l[-2]:
l = l[:-2]
return l if l else 0
print(xiaochu(input()))
#你的秋招进展怎么样了#