Re: [閒聊] 每日leetcode

作者: DJYOMIYAHINA (通通打死)   2024-07-06 09:30:54
肥肥覺得這題
音該要有medium to hard
點點點
一二三四五
def passThePillow(self, n: int, time: int) -> int:
modulo = (time) % (2*n-2)
if modulo < n:
return modulo+1
else:
return n-(modulo-(n-1))
return -1
作者: sustainer123 (caster)   2024-07-06 09:31:00
大師
作者: smart0eddie (smart0eddie)   2024-07-06 09:36:00
大師
作者: rainkaras (rainkaras)   2024-07-06 09:40:00
音該

Links booklink

Contact Us: admin [ a t ] ucptt.com