2302. Count Subarrays With Score Less Than K | Java | Leetcode |

preview_player
Показать описание
Description: The score of an array is defined as the product of its sum and its length.

For example, the score of [1, 2, 3, 4, 5] is (1 + 2 + 3 + 4 + 5) * 5 = 75.
Given a positive integer array nums and an integer k, return the number of non-empty subarrays of nums whose score is strictly less than k.

A subarray is a contiguous sequence of elements within an array.

Рекомендации по теме
welcome to shbcf.ru