#t205. 计算(a+b)/c的值
计算(a+b)/c的值
Compute (a+b)/c
Problem Background
Special for beginners, ^_^
Problem Description
Given integers , compute the value of the expression , where denotes integer (truncating) division.
Input Format
A single line containing three integers , separated by single spaces. (, and is not .)
Output Format
A single line: the value of the expression.
Sample Input
1 1 3
Sample Output
0
Hint
- Think: when two
intvalues are divided, what type is the result? This problem wants exactly that result — don't rush to convert todouble. - Check against the sample:
1 1 3→0.
Note: In C/C++, integer division truncates by default, i.e. the fractional part is simply discarded — equivalently, it is the integer part of the quotient of the two numbers.