Ai
2 Star 7 Fork 1

zeruns/Python编程练习题

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.py 389 Bytes
一键复制 编辑 原始数据 按行查看 历史
zeruns 提交于 2020-07-31 01:08 +08:00 . test
class Solution(object):
def integerBreak(n):
"""
:type n: int
:rtype: int
"""
if (n <= 2):
return 1
if (n == 3):
return 2
if (n == 4):
return 4
res = 1
while (n > 4):
res *= 3
n -= 3
res *= n
return res
print(Solution.integerBreak(11))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zeruns/Python-programming-exercises.git
git@gitee.com:zeruns/Python-programming-exercises.git
zeruns
Python-programming-exercises
Python编程练习题
master

搜索帮助