Search⌘ K
AI Features

Diet Plan Performance

Diet Plan Performance reviews each k-day stretch of daily calories, losing a point below the lower limit, gaining one above the upper limit, and leaving points unchanged otherwise. Return the score.

Statement

A dieter consumes calories[i] calories on the i-th day.

Given an integer ...