m = int(input('输入m:'))
n = int(input('输入n:'))
a = m * n
i = 0
sum = 0
while i <= len(range(a)) - 1:
x = 2 ** i
sum += x
i += 1
print("小 B 能收获%d米粒" % sum) n = int(input('输入棋盘的长:'))
m = int(input('输入棋盘的宽:'))
s = []
x = 0
a = 0
for i in range(n):
for j in range(m):
a = 2 ** x
s.append(a)
x += 1
print('小B能收获%d粒' % sum(s)) 学习 n=int(input())
m=int(input())
l=m*n
s=0
for i in range(l):
s+=2^i
print(s)
页:
1
[2]