T1312 Insect Reproduction (#Ⅱ-3)

【Title description】

Scientists have discovered a special kind of insect in tropical forests, which is very capable of reproduction. Each pair of adults lays y pairs of eggs in x months, and each pair of eggs takes two months to grow into adults. Assuming that each adult worm does not die, there is only one pair of adult worms in the first month, and the eggs do not lay eggs in the first month after they grow into adults (the eggs are laid after X months), how many pairs of adult worms are there after Z months? 0≤X≤20, 1≤Y≤20, X≤Z≤50.

【enter】

Numerical values ​​of x, y, z.

【Output】

After Z months, there are a total of adult pairs.

【Input example】

1 2 8

【Example of output】

37

【Source program】

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324855934&siteId=291194637