Students and apples 1
sstudents in the class and they have
aapples. They would like to split the apples among each other as equally as possible. So, they divide the apples among each other and gift the rest to their teacher. We would like to know how many apples are there going to be for each student and how many their teacher would get.
The first line of the input contains the number of students
s. The second line contains the number of apples
a. Print the number of apples per student and the number of apples the teacher would get after division in the output.
Explanation: There are 7 students and 30 apples. In case of equal division, students would get the following amount of apples:
4 4 4 4 4 4 4and would leave the remaining
2apples to their teacher.
Time limit: 1 seconds
Memory limit: 512 MB
Output limit: 1 MB