← Back to Forum

CCC 2020 J2 - Epidemiology Solution

#Morgan Su, BayviewSS
P=int(input())
N=int(input())
R=int(input())

total=N
amt=N
counter=0

#keep simulating days until total of infected exceeds P
while total<=P:
    nInf=R*amt
    total+=nInf
    amt=nInf
    counter+=1

print(counter)
By msu7 on 8/4/2025
1

Comments