#K11251. Chairs Arrangement
Chairs Arrangement
Chairs Arrangement
Problem Statement:
You are given a total number of chairs n. These chairs are to be arranged in rows where each row can hold exactly 8 chairs. Your task is to determine:
- The number of complete rows that can be formed.
- The number of chairs that remain in an incomplete row (if any).
You can use the formulas below to compute the values:
- Complete rows: \(\lfloor \frac{n}{8} \rfloor\)
- Remaining chairs: \(n \bmod 8\)
Input: An integer \(n\) representing the total number of chairs.
Output: Two space-separated integers representing the number of complete rows and the remaining chairs.
Constraints: \(0 \leq n \leq 10^9\).
Make sure to read input from stdin
and output your result to stdout
.
inputFormat
The input consists of a single integer \(n\) which denotes the total number of chairs.
outputFormat
Output two integers separated by a space. The first integer is the number of complete rows and the second integer is the count of chairs in the incomplete row (if any).
## sample16
2 0