#include // #ifndef ONLINE_JUDGE // #include "debug/debug_template.cpp" // #else // #define debug(...) // #define debugArr(...) // #endif #define ll long long #define nl "\n" #define vi vector #define vvi vector> #define int long long #define pii pair #define double long double #define pb push_back #define here cout<<"HERE"< using min_heap = std::priority_queue, std::greater>; using namespace std; void solve(){ int x,y,l; cin >> x >> y >> l; bool origin=false; if(x==0 and y==0){ cout<<0<0)ans++; if(y>0 and x>0)ans++; if(y>0 and x==0)goto jba; if(x<0 and y>0)ans++; if(x<0 and y==0)ans++; if(x<0 and y<0)ans+=2; if(x==0 and y<0)ans+=2; if(x>0 and y<0)ans+=2; // if(x>0 and y<0){ // ans++; // } jba: int xa=abs(x); int xy=abs(y); ans+=(xa+l-1)/l; ans+=(xy+l-1)/l; cout<> t; while (t--){ solve(); } return 0; }