题目描述
Problem Description
In class, students often need to practice mental arithmetic.
The teacher has given an exercise: Calculate the value of $\bigg\lfloor \dfrac{x}{y} \bigg\rfloor$, and you are to answer this question.
Here, $\lfloor a \rfloor$ represents the largest integer not greater than $a$, such as $\lfloor 1.1 \rfloor = 1, \lfloor 4 \rfloor = 4, \lfloor -2.2 \rfloor = -3$.
Hint:
In C++, for int type variables x, y, the statement x/y calculates the value of $\dfrac{x}{y}$ rounded towards zero. For example:
int x = -3, y = 2;
cout << x / y;
The above code will output -1.
The floor function, which rounds down, for example: floor(-1.5) = -2.0.
Input Format
The input consists of two integers $x, y$ on a single line, with the guarantee that $y \neq 0$.
Output Format
Output a single integer, which is the value of $\bigg\lfloor \dfrac{x}{y} \bigg\rfloor$.
Sample Input and Output
Sample Input #1
2 1
Sample Output #1
2
Sample Input #2
-3 2
Sample Output #2
-2
Notes
For 20% of the data, $y = 1$;
For another 20% of the data, it is guaranteed that $x = ky, k \in \Z$;
For another 20% of the data, it is guaranteed that $x \times y > 0$;
For 100% of the data, $-10^3 \le x, y \le 10^3, y \neq 0$.
Hint:
If you are unable to complete this problem, it is recommended to attempt the subsequent competition problems first.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分