Candy Share
A1300
English
Language
Contribute a translation- Time limit
- 1000 ms
- Memory limit
- 256 MB
- Submissions
- 9
- Correct
- 7
- Solved by
- 7
- AC rate
- 77.778%
Statement
There are $N$ candies and $K$ students. The teacher gives each student the same number of candies as much as possible. Any leftover candies remain with the teacher.
Print how many candies each student receives and how many candies are left.
Input
The first line contains two integers $N$ and $K$. ($1 \le N \le 10\,000$; $1 \le K \le 100$)
Output
Print the number of candies each student receives and the number of candies left over, separated by a space.
Examples
Sample input 1
23 5
Sample output 1
4 3
Each of the $5$ students gets $4$ candies, using $20$ candies total. There are $3$ candies left.
Sample input 2
100 10
Sample output 2
10 0
Each student gets exactly $10$ candies, and none are left.