#K81482. Apple Distribution Challenge
Apple Distribution Challenge
Apple Distribution Challenge
You are given two integers: the total number of apples, and the number of students. Your task is to distribute the apples equally among the students and output both the number of apples each student receives and the remaining apples.
The distribution follows the formulas:
$a = \left\lfloor \frac{A}{S} \right\rfloor$ and $r = A \bmod S$, where $A$ is the total number of apples, $S$ is the total number of students, $a$ is the number of apples per student, and $r$ is the remainder.
If the number of students is zero, the program should output the error message: "Invalid input: number of students cannot be zero".
inputFormat
The input is provided via standard input (stdin) and consists of two integers separated by whitespace. The first integer represents the total number of apples, and the second integer represents the total number of students.
outputFormat
If the number of students is not zero, print two integers separated by a space: the first integer is the result of the floor division (apples per student) and the second integer is the remainder. If the number of students is zero, print the error message exactly as follows: "Invalid input: number of students cannot be zero".
## sample10 3
3 1