Randomness

2

1 votes
Medium
Problem

You are given the randomness of n atoms which are present inside an area. A range of atoms is said to survive if the product of their randomness is less than or equal to some threshold randomness k.

You have to find out the number of such ranges, where a range is represented as [i, j].

Here, 1 <= i <= j <= n

Input:

The first line of input contains - the number of test cases. Each test case goes as follows:

The first line of each test case contains two space-separated integers n and k.

Next line of test case contains n space-separated integers, where the ith integer is the randomness of the ith atom.

Output:

Print t lines, the answer to the above problem for each test case.

Constraints:

1 <= t <= 100

1 <= n <= 10^3

1 <= randomness of an atom <= 10^17

1 <= k <= 10^18

Problem Setter:

Devesh Jagwani

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?