Problem 44370. Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more, after one more half-hour they ordered two more beers like sum of previous two times. Then after having spend a good time and anoter half an hour they ordered three beers. The situation went on. Task: calculate how many beers they ordered after n half-hours for given n - number of half-hours.

Example:

n=1 result will be 2;

n=2 result will be 4.

Solution Stats

35.33% Correct | 64.67% Incorrect
Last Solution submitted on Jun 03, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers475

Suggested Problems

More from this Author37

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!