as in the question it is told " Each element of the set is between l and r (inclusive)."

so according to this for input 7 8 4 answer should be 1 but accepted solution is giving 1

1 Like

Answer for 7 8 4 should be 0

1 Like

But 8 is divisible by 4 and hence the answer should be 1

Que says gcd should be 4

But gcd of {8} is 8 not 4

1 Like