#C6106. Completely Filled Rows of Stamps
Completely Filled Rows of Stamps
Completely Filled Rows of Stamps
You are given two integers \( n \) and \( k \). Here, \( n \) represents the total number of stamps and \( k \) represents the number of slots in each row.
Your task is to determine the maximum number of completely filled rows of stamps and the number of stamps remaining that cannot completely fill an additional row.
More formally, compute the values:
\[ \text{filledRows} = \left\lfloor \frac{n}{k} \right\rfloor, \quad \text{remainingStamps} = n \mod k \]For example, if \( n = 10 \) and \( k = 3 \), then there are 3 fully filled rows and 1 stamp remains.
inputFormat
The input is given in a single line which contains two space-separated integers:
- \( n \): the total number of stamps (1 ≤ n ≤ 109)
- \( k \): the number of slots in each row (1 ≤ k ≤ 109)
outputFormat
Output two integers separated by a space: the first integer is the maximum number of fully filled rows and the second integer is the remaining number of stamps.
## sample10 3
3 1