EUler Totient Function Help

Please help in this question where we have to answer 10 queries and in each query we have been given 3 numbers, l,r,k. we have to tell number of numbers which are multiple of k in the in the set
ETF(l),ETF(l+1),ETF(l+2)....ETF( R)
Where ETF(X) is Euler totient function of X,

Constraints:-
1<=L,R<=10^12
1<=R-L<=10^5
k<=10^6

Problem link