[Python Challenge通关]第0关 warming up

  • Post author:
  • Post category:python


calc

Hint: try to change the URL address.

挑战地址,

点我

分析

根据提示信息

Hint: try to change the URL address.

尝试修改 URL 地址。 图片上显示的是 2 的 38 次方,猜测是计算 2 的 38 次方的结果来修改 URL。

2 ** 38
# 274877906944

当前页面的 URL 地址是:

http://www.pythonchallenge.com/pc/def/0.html

替换掉其中的数字

0

,即可进入下一关卡

http://www.pythonchallenge.com/pc/def/274877906944.html

补充

python 中计算 2 的 38 次方的几种方式:

2 ** 38
1 << 38
pow(2, 38)

参考资源:


  1. numbers 官方文档

  2. pow 官方文档

  3. pow 参考

转载于:https://my.oschina.net/jianggushi/blog/2961481