Cody

Problem 44370. Octoberfest festival

Created by Andriy Kavetsky in Community

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

37.73% Correct | 62.27% Incorrect
Last solution submitted on Apr 02, 2019

Problem Comments

Solution Comments