help

Кролики

Как-то наконец земляне нашли обитаемую планету, назвали ее ТТВ, и отправили вместе с кораблем туда одного кролика. Кролику понравился климат новой планеты и через месяц он произвел на свет еще одного кролика. Известно, что каждый месяц каждый кролик, присутствующий на планете, производил на свет еще одного кролика. На планете откуда-то взялся монстр, который в начале месяца съедал k кроликов, если только их становилось строго больше k. В задаче необходимо определить количество кроликов, которое будет на планете через n месяцев после прибытия туда космического корабля с первым кроликом.

Входные данные

Первая строка содержит количество месяцев n (0 ≤ n ≤ 100), вторая - число кроликов k (0 ≤ k ≤ 10000), которое съедал монстр.

Выходные данные

Определить количество кроликов, которое будет находиться на планете ТТВ через n месяцев после поселения туда первого кролика. Известно, что результат для любого теста всегда не больше 2*109.

Time limit 1 second

Memory limit 64 MiB
Input example
Sample 1
0
10

Sample 2
1
10

Sample 3
5
10
Output example
Sample 1
1

Sample 2
2

Sample 3
1
1. Posting in Russian strongly reduces your chances for help, English (even with some mistakes) will be understood by a lot more members.
2. Posting just your (homework) assignment without the code you made when tying to do it yourself further reduces your chances for help.
3. Not asking a clear question (explaining what your specific problem is) reduces your chance for help even further.

I would recommend you to update your question addressing these three points.
thanks for advicing, but my problem is i can't guess what that text means, i don't know Russian and i was thinking that someone helped me :/
I put it in google translate because I was curious, worked fairly well.
Last edited on
i don't think so
closed account (48T7M4Gy)
i don't think so


I do. This is the Russian to English translation Nico is probably referring to.
So what language do you want it in, bikini?

Rabbits
Once Earthlings finally found a habitable planet, called it TTV, and sent down with
the ship to get a rabbit. Rabbit liked the climate of the new planet and a month
later he sired another rabbit. We know that every month each rabbit is present
on the planet, sired another rabbit. On a planet where something took a monster
who at the beginning of the month k ate rabbits, unless they became severely
large k. The problem we need to determine the number of rabbits that will be in
the world after n months after the arrival of the spacecraft to the first rabbit.

Input data
The first line contains the number of months, n (0 ≤ n ≤ 100), the second - the
number of rabbits k (0 ≤ k ≤ 10000), which ate the monster.
Output
Determine the number of rabbits that will be on the planet TTV after n months
after the settlement to the first rabbit. It is known that the result of any test is never more than 2 * 109.


Last edited on
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/203249/
i wish i had it for Georgian
i got it, thanks i will fix it
Topic archived. No new replies allowed.