Codeforces Round 685 DIV-2 Circle Game

can someone please review my code for Circle game
problem : Problem - D - Codeforces
my solution : ( first I let Ashish and Utkarsh travel vertically(along y axis till (number of moves)*k<=d ) then I switched them horizontally ( along x axis till (the condition x^2 +y^2 <= d^2 holds true and updated number of moves ++ ) finally if number of moves are even Utkarsh wins else Ashish wins ) here is my code :

     #include <bits/stdc++.h>
      using namespace std;
      #define int long long
      int32_t main()
     {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        int t;
        cin>>t;
        while(t--)
        {
           int d,k;
           cin>>d>>k;
           int m=k;
           if(d%k==0)
           {
               if((d/k)%2==0)
               {
                   cout<<"Utkarsh"<<endl;
               }
               else
               {
                   cout<<"Ashish"<<endl;
               }
           }
           else
           {
               int a = d/k;
               a=a*k;
               int b = d/k;
               while(true)
               {
                   if((d*d)>=(a*a)+(k*k))
                   {
                       b++;
                       k=k+m;
                   }
                   else
                   {
                       break;
                   }
               }
                if((b)%2==0)
               {
                   cout<<"Utkarsh"<<endl;
               }
               else
               {
                   cout<<"Ashish"<<endl;
               }
           }
        }
        return 0;
      }

if it is giving wrong answer at test case 5, then the error is integer overflow…because you have declared d as int…it will give integer overflow for (d*d)…same happened for me but i corrected it later on…

if the problem still persists, you can see my code for reference…Submission #99206144 - Codeforces