Arcesium | Round 2 onsite | Virus Cells | April 2022
Anonymous User
602

A lab was trying to synthesize a new virus. They had 1 cell of that virus in a vial on day 1.
The virus starts giving birth to a new cell every day after B days and it also dies after C days.
On a new day, the cell will die (if it is supposed to die) before it gives birth to new cells.

Find the number of virus cells in the vial on the Ath day.

Problem Constraints
1 <= A <= 105
1 <= B <= A
B < C <= A

Input Format
The first argument is the integer A.
The second argument is the integer B.
The third argument is the integer C.

Output Format
Return a single integer denoting the number of virus cells on day A.

Example Input
Input 1:
A = 5
B = 2
C = 3

Input 2:
A = 5
B = 1
C = 5

Example Output
Output 1:
2

Output 2:
16
Comments (2)