Coding Question on modular operations

Can I get some help with this question?
This is my code but it’s showing the wrong answer even after passing test cases.

 #include <bits/stdc++.h>
  #include <cmath>
  using namespace std;
  typedef long long int lli;
  
  int main()
  {
    //write your code here
    int t;
    cin>>t;
    while(t--){
      lli r,p,q,count=0;
      cin>>r>>p>>q;
      if(p%r==0)
      count++;
      double a=(double)(q-p)/r;
      if(floor(a)!=ceil(a))
      count++;
      count+=(int)a;
      cout<<count<<endl;
    }
    return 0;
  }






















Hi Sapna2001,
can you share with us the link to the challenge please
thanks

This is not a challenge. It is one of my coding assignments.