#C1150. Cell Replication Challenge
Cell Replication Challenge
Cell Replication Challenge
This problem involves calculating the number of cells after \(N\) minutes during a cell replication process under different environmental conditions. In a non-hostile environment, the cells double every minute which results in \(2^N\) cells after \(N\) minutes. In a hostile environment, the cells double only once every two minutes, giving \(2^{\lfloor N/2 \rfloor}\) cells. Your task is to compute the final number of cells given the values of \(N\) and \(H\).
inputFormat
The input consists of a single line containing two space-separated integers \(N\) and \(H\):
- \(N\) \((0 \leq N \leq 10^9)\): the number of minutes.
- \(H\): the environment indicator where 0 means non-hostile and 1 means hostile.
outputFormat
Output a single integer representing the number of cells present after \(N\) minutes under the specified environmental condition.
## sample0 0
1
</p>