Problem with 'no of queries'

I do not understand the concept of no of queries here. should I take input the no of queries and run the code in a loop Q times ?

hello @rick711c
yes u need to take q and run loop q times to answer q queries

but it will increase the the time complexity . in this problem it will be O(n^3)

pls share ur code with me.

time complexity will remain q*max(a,b)

to answer all queries .
u need to read q and then run loop for q times and then in that loop read two number and print what is asked.

time compexity will be O(Q * Maximum B)

yea i do that ,but it says time limit exceed

u should update no like->
no=no>>1;

correct this

it sayas wrong ans now …

pls share ur complete code with me

got it…thanks for your help

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.