7 lines
97 B
C++
7 lines
97 B
C++
#define div _div
|
|
ll div(ll A, ll B)
|
|
{
|
|
ll q = A/B;
|
|
if(A<0) q-=(B>0)-(B<0);
|
|
return q;
|
|
} |