SP11391 EASYMATH - EASY MATH
Description
You will be given 4 numbers
n m a d
find count of numbers between n & m (inclusive) not divisible by (a) or (a+d) or (a+2d) or (a+3d) or (a+4d).
Input Format
first line has number t - number of test cases.
each test case has 4 numbers n m a d
Output Format
Single line having single number giving the count