1744. Can You Eat Your Favorite Candy on Your Favorite Day
On This Page
class Solution:
def canEat(self, candiesCount: List[int], queries: List[List[int]]) -> List[bool]:
s = list(accumulate(candiesCount, initial=0))
res = []
for t, day, mx in queries:
least, most = day, (day + 1) * mx
res.append(least < s[t + 1] and most > s[t])
return res