A secret can be told only to 2 persons in 5 minutes. Now, these 2 more persons can spread the secret to 4 other people in the next 5 minutes. this way continues... So How long will it take to spread the secret to n persons? Output will be for two scenarios -
- z(1) -- each person can continue spreading the secret
- z(2) -- each person can tell the secret to only two persons
n.b. outputs can only be multiples of 5.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers19
Suggested Problems
-
6993 Solvers
-
4011 Solvers
-
Project Euler: Problem 2, Sum of even Fibonacci
2907 Solvers
-
Set some matrix elements to zero
641 Solvers
-
Replace multiples of 5 with NaN
472 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!