Sir I am unable to understand the solution explained in the hint vedio. Pls help me out with this.
Find It : Number Theory
hey @aman_ishan since the number of queries can be as high as 10^5 and N can also be as high as 10^5 so we need to solve for each query in O(1) else it will timeout. For that we need to pre compute. So we’ll maintain a count array of divisiors which will show how many number of times they have appeared For each given element we will iterate over its divisors and increment them by one and while solving queries we will just print the number adjacent to the given divisor
Sir i am not able to submit the solution to this ques. Pls help. IDE : https://ide.codingblocks.com/s/193955
I don’t have that sir
@aman_ishan i dont know Java i can provide you with the working code in c++, https://ide.codingblocks.com/s/194504
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.