这样写也是可以的
# Enter a code
L1=[1,2,3]
L2=[5,3,2]
L3=[7,3,2]
L=[L1,L2,L3]
c=0
while c<3:
C=L[0][c]
K=L[1][c]
G=L[2][c]
bmj=C*K*2+C*G*2+G*K*2
c=c+1
print(bmj)
# Enter a code
L1=[1,2,3]
L2=[5,3,2]
L3=[7,3,2]
L=[L1,L2,L3]
c=0
while c<3:
C=L[0][c]
K=L[1][c]
G=L[2][c]
bmj=C*K*2+C*G*2+G*K*2
c=c+1
print(bmj)
2021-03-13
举报