#B2010. Integer Division and Remainder
Integer Division and Remainder
Integer Division and Remainder
Calculate the integer quotient and remainder when a dividend is divided by a divisor using standard integer division and modulo operation. In mathematical terms, given two integers (a) (dividend) and (b) (divisor), the operations can be described by the equation: (a = b \times q + r), where (q) is the quotient and (r) is the remainder (with (0 \leq r < |b|)).
inputFormat
The input consists of two integers separated by a space: the dividend and the divisor.
outputFormat
Output two integers separated by a space, where the first number is the quotient and the second number is the remainder.
sample
10 3
3 1