Search⌘ K
AI Features

Solution: Count Subarrays With Score Less Than K

Solution: Count Subarrays With Score Less Than K asks you to count non-empty contiguous subarrays of positive-integer arrays whose sum is multiplied by its length is strictly less than a given value.

Statement

An array score is defined as the sum of the array elements multiplied by its length. For example, if the array is [2,1,5][2, 1, 5] ...