Problem 45244. How many Christmas presents under the tree?
For many families at Christmas, each family member gives 1 present to every other family member. The main exception is that children under the age of 16 do not contribute any presents. If there is only 1 child in the family, then that child is considered "spoilt" and receives 2 presents from each adult instead.
Given the size of a family (Nf) and the number of children under the age of 16 (Nc), find the number of presents under the Christmas tree!
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers122
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1908 Solvers
-
Project Euler: Problem 5, Smallest multiple
1504 Solvers
-
1309 Solvers
-
Create a vector whose elements depend on the previous element
712 Solvers
-
1716 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!