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