#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 || y==0){ origin=true; } int ans=0; // // if(!origin) ans++; if(!origin){ if(x>0 and y>0){ ans++; }else if(x<0 and y>0){ ans++; }else ans+=2; } if(x==0 and y<0)ans++; if(y==0 and x!=0)ans++; // if(x>0 and y<0){ // ans++; // } 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; }