Tap here to switch tabs
Problem
Submissions

Problem: Maximum Number of Operations With the Same Score I

med
30 min
Try to solve the Maximum Number of Operations With the Same Score I problem.

Statement

Given an integer array nums, consider an operation where the first 22 elements of nums are removed and their sum is calculated as the score of the operation.

You start by performing this operation once. You can continue performing operations as long as nums contains at least 22 elements and each subsequent operation yields the exact same score as the first operation.

Return the maximum number of operations that can be performed.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Number of Operations With the Same Score I

med
30 min
Try to solve the Maximum Number of Operations With the Same Score I problem.

Statement

Given an integer array nums, consider an operation where the first 22 elements of nums are removed and their sum is calculated as the score of the operation.

You start by performing this operation once. You can continue performing operations as long as nums contains at least 22 elements and each subsequent operation yields the exact same score as the first operation.

Return the maximum number of operations that can be performed.

Constraints:

  • 2≤2 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤1000\leq 1000