Tap here to switch tabs
Problem
Submissions

Problem: Average Value of Even Numbers Divisible by Three

Average Value of Even Numbers Divisible by Three asks you to find the floor of the average of an array's even values that are also divisible by three, or return zero if none qualify.

Statement

Given an integer array nums of positive integers, return the average value of all even numbers that are divisible by 33. If no such integers exist, return 00.

Note: The average of nn elements is the sum of the nn elements divided by nn, rounded down to the nearest integer.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

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

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Average Value of Even Numbers Divisible by Three

Average Value of Even Numbers Divisible by Three asks you to find the floor of the average of an array's even values that are also divisible by three, or return zero if none qualify.

Statement

Given an integer array nums of positive integers, return the average value of all even numbers that are divisible by 33. If no such integers exist, return 00.

Note: The average of nn elements is the sum of the nn elements divided by nn, rounded down to the nearest integer.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

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