1001: tree planting problems

Title Description

Arbor Day tree planting activity carried out in a school, known saplings have m lines, students have participated in tree planting n people (and m> n), can I ask each student an average of several strains of trees? There are several strains of the rest?

Entry

Input two integers m and n, respectively, represent the number of seedlings and the number of students (m> n).

Export

Output two integers, represent the number of trees of each student and the average number of remaining trees.

Sample input Copy

163 32

Sample output Copy

5 3

Source / classification

 

 

 

 

 

 

 

 1 #include<stdio.h>
 2  
 3 int main()
 4 {
 5     int m,n;
 6      
 7     scanf("%d %d",&m,&n);
 8     printf("%d %d",m/n,m%n);
 9     return 0;
10 }

 

Guess you like

Origin www.cnblogs.com/wangmengru/p/11480776.html