题解 | #2的n次方计算#
2的n次方计算
https://www.nowcoder.com/practice/35a1e8b18658411388bc1672439de1d9
#include <stdio.h> int main() { int n, i, tmp; scanf("%d", &n); for (i=0; i<n; i++){ tmp = 1 << n; } printf("%d", tmp); return 0; }
2的n次方计算
https://www.nowcoder.com/practice/35a1e8b18658411388bc1672439de1d9
#include <stdio.h> int main() { int n, i, tmp; scanf("%d", &n); for (i=0; i<n; i++){ tmp = 1 << n; } printf("%d", tmp); return 0; }
相关推荐