Tap here to switch tabs
Problem
Submissions

Problem: Greatest Sum Divisible by Three

med
30 min
Try to solve the Greatest Sum Divisible by Three problem.

Statement

Given an integer array nums, return the maximum possible sum of elements chosen from the array such that the sum is divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤4imes104\leq 4 imes 10^4

  • 1≤1 \leq nums[i] ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Greatest Sum Divisible by Three

med
30 min
Try to solve the Greatest Sum Divisible by Three problem.

Statement

Given an integer array nums, return the maximum possible sum of elements chosen from the array such that the sum is divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤4imes104\leq 4 imes 10^4

  • 1≤1 \leq nums[i] ≤104\leq 10^4