Number Of Multiples.

Правка en2, от UnfilledDreams, 2018-05-18 01:56:33

I was solving a problem but I couldn't solve that problem.
Given an array of N elements, we have to answer Q queries in each query two number i and X will be given we have to find how many multiples of X will be there in the array after the ith (including i) index. The range of N, Q is 10^5 and same for the array elements.
Please help me out with the logic.
Thanks in advance.

Теги #math

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский UnfilledDreams 2018-05-18 01:56:33 52
en1 Английский UnfilledDreams 2018-05-18 01:53:38 404 Initial revision (published)