Table of contents
Question description
Kindergarten organizes activities, and the teacher assigns a task:
Each child should find out how many children there are in the same community as him.
We aggregate these quantities into the array garden.
Based on the information given by these children, please calculate at least how many communities the children in the class come from?
Enter description
Input: garden[] = {2, 2, 3}
Output description
Output: 7
Remark
- The maximum length of the garden array is 999
- The maximum number of children in each community is 1000, that is, the range of garden[i] is [0, 9