Count Triplets With Even Product

Given an integer array nums and a positive integer M, choose three distinct indices (i, j, k) such that i < j < k. Count the triplets whose product nums[i] * nums[j] * nums[k] is even, a...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: