Company: Amazon Ml school_3aug
Difficulty: medium
Covid - 20 Problem Description A lab culture starts on day 1 with a single cell of an experimental organism. Each cell begins spawning one new cell per day once it reaches an age of B days, and every cell dies once it reaches an age of C days. On any given day, a cell that is old enough to die does so before any of that day's births are counted. Determine how many cells remain in the culture 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]