Re: [闲聊] 每日leetcode

楼主: DJYOMIYAHINA (通通打死)   2025-07-21 21:57:10
https://iili.io/FNAUGZF.png
不懂为何如此离群
普通人应该都这样写吧
def makeFancyString(self, s: str) -> str:
pre_ch, times = "", 1
rets = ""
for c in s:
if c==pre_ch:
if times==2:
continue
else:
times+=1
else:
pre_ch=c
times=1
rets += c
return rets
作者: osopopototo (樱巫女的马桶)   2025-07-21 22:01:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com