Let totali be the number of total infected people till the ith day.

So, the number of new infected people on (i+1)th day newi+1 = totali × 2 and total number of infected people till (i+1)th day is totali + newi+1.

Totali and newi become large with increasing N.

So, the calculation may not fit into 32-bit integer calculation.

Statistics

95% Solution Ratio
jebouinEarliest, Apr '20
jebouinFastest, 0.0s
Wojciech.324122Lightest, 0 B
bokaifShortest, 145B
Toph uses cookies. By continuing you agree to our Cookie Policy.