We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
``` """ 线性对数阶 """ def linear_log_recur(n): if n <= 1: return 1 count = linear_log_recur(n // 2) + \ linear_log_recur(n // 2) for _ in range(n): count += 1 return count ```
TypeError: 'float' object cannot be interpreted as an integer
""" 线性对数阶 """ def linear_log_recur(n): if n <= 1: return 1 count = linear_log_recur(n / 2) + \ linear_log_recur(n / 2) i = 0 while i < n: count += 1 i += 1 return count
The text was updated successfully, but these errors were encountered:
哈喽,谢谢指正!这样可能所有带 for 循环的都要改下,range() 只允许传入整数,我打算做一下 int() 处理。
range()
Sorry, something went wrong.
please reopen due issue has not been resolved yet
Sorry that I missed it. Fixed in #1164 (Use int instead)
def linear_log_recur(n: int) -> int: """线性对数阶""" if n <= 1: return 1 count: int = linear_log_recur(n // 2) + linear_log_recur(n // 2) for _ in range(n): count += 1 return count
No branches or pull requests
The text was updated successfully, but these errors were encountered: