最佳答案
Project Euler 和其他编码竞赛通常有最长的运行时间,或者人们吹嘘他们的特定解决方案运行得有多快。对于 Python,有时候这些方法有些笨拙——例如,向 __main__
添加计时代码。
分析 Python 程序运行时间的好方法是什么?