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