{"raw_statement":[{"iden":"statement","content":"Throughout this global pandemic, many health experts and doctors are steadfast on the effort to \"flatten the curve\", or to decrease the maximum amount of people who are getting infected by the virus, using the method of social distancing, one of the reasons why we are in quarantine at this very moment.\n\nThe daily rate of infection, if left unchecked, can look a lot like this logistic function, where $Delta N$ is the total number of cases, $Delta t$ is the time period for new infections, (which, in this case, would be one day.)\n\n$frac(Delta N, Delta t) = a (1 -frac(N, N_(m a x))) N$\n\n$a$ is the infection rate, which, for COVID-19, would be .394 (with social distancing, the number is able to go down). Finally, $N_(m a x)$ is the total amount of infections we can expect for the curve to flatten. In this simulation, we will calculate the total number of days $t$ the virus will take in order for it to infect the entire population of America dependant on its infection rate, which will be about 320 million people.\n\nThe first line will contain the integer $n$, which denotes the amount of test cases that will follow. Each line below the first line will contain a floating point value $a$, which is the infection rate for that test case.\n\nLet $N_(m a x)$ be equal to around 328.2 million people, which is the entire population of the US, however, you should output the number of days it takes for the virus to infect 320 million people, which is a vast majority.\n\n($N$ will also have an initial value of 1)\n\n"},{"iden":"input","content":"The first line will contain the integer $n$, which denotes the amount of test cases that will follow. Each line below the first line will contain a floating point value $a$, which is the infection rate for that test case."},{"iden":"output","content":"Let $N_(m a x)$ be equal to around 328.2 million people, which is the entire population of the US, however, you should output the number of days it takes for the virus to infect 320 million people, which is a vast majority."},{"iden":"note","content":"($N$ will also have an initial value of 1)"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ i \\in \\{1, \\dots, n\\} $, let $ a_i \\in \\mathbb{R}^+ $ denote the infection rate.  \n\nLet $ N_{\\text{max}} = 328.2 \\times 10^6 $, and let $ N_0 = 1 $.  \nDefine $ N(t) $ as the number of infected individuals at day $ t $, governed by the differential equation:  \n$$\n\\frac{dN}{dt} = a \\left(1 - \\frac{N}{N_{\\text{max}}}\\right) N\n$$\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ 0 < a_i \\leq 1 $ for all $ i \\in \\{1, \\dots, n\\} $  \n\n**Objective**  \nFor each test case $ i $, find the smallest integer $ t_i \\in \\mathbb{Z}^+ $ such that $ N(t_i) \\geq 320 \\times 10^6 $, where $ N(t) $ is the solution to the logistic differential equation with initial condition $ N(0) = 1 $.","simple_statement":"Given an infection rate `a`, calculate how many days it takes for a virus to infect 320 million people, starting from 1 infected person, using the formula:  \ndN/dt = a * (1 - N/N_max) * N,  \nwhere N_max = 328.2 million.  \nOutput the number of days needed to reach 320 million infections.","has_page_source":false}