Company: Amazon Ml school_3aug
Difficulty: medium
Covid - 20 Problem Description 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 after A days. Note: Since, the answer can be very large, output the answer modulo 10 9 +7 Constraints 1 5 1 B 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. Examples Example 1: Input: A = 5 B = 2 C = 3 Output: 2 Explanation: The number of cells in the vial from day 1 to day 5 are [1, 1, 2, 1, 2] Example 2: Input: A = 5 B = 1 C = 5 Output: 16 Explanation: The number of cells in the vial from day 1 to day 5 are [1, 2, 4, 8, 16]