This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
你们非常接近!这是我的解决方案
然后你的输出是:
You were very close! Here is my solution
And, then your output is:
你能使用 numpy 吗?
它的工作原理如下:
Can you use
numpy
?It works like this:
在不依赖其他模块/库的情况下,最好的选择是在循环之外处理打印。这是一种方法:
Without relying on another module/library, your best bet is to handle the printing outside the loop. Here's one way to do it:
我的解决方案:
输出:
注意:我根本没有使用
B
。My solution:
Output:
Note: I didn´t use
B
at all.