1 条题解
-
0
练10.1 细胞分裂
解题思路
细胞每次分裂数量翻倍,五次后为 2^5=32。
正确性说明
初始为 1,连续五次乘 2,符合每次二分的规则。
易错点
没有输入;第五次不是第五天的初始状态。
复杂度
本题输入规模固定,时间 O(1),额外空间 O(1)。
参考代码(C++11)
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << (1 << 5) << "\n"; return 0; }
- 1