You are given an integer array nums and two integers a and b.
A subarray is considered valid if:
It contains at least
The ratio of the number of even integers to the number of odd integers in the subarray is at most b is less than or equal to the number of odd integers multiplied by a.
Return the total number of valid subarrays of nums.
Constraints:
nums.length
nums[i]
a, b
You are given an integer array nums and two integers a and b.
A subarray is considered valid if:
It contains at least
The ratio of the number of even integers to the number of odd integers in the subarray is at most b is less than or equal to the number of odd integers multiplied by a.
Return the total number of valid subarrays of nums.
Constraints:
nums.length
nums[i]
a, b