安全问答

安全问答是一个知识全球问答,包含丰富的问答知识

首页 常规 游戏 娱乐 科技 程序员

编写Python程序求任意正整数n的所有约数不要有提示语

  • 日期: 2024-07-04
  • 标签: 教育

n = int(input("请输入一个正整数:"))

factors = []

for i in range(1, n+1): if n % i == 0: factors.append(i)

print("所有约数为:", factors)

编写Python程序求任意正整数n的所有约数不要有提示语

原文地址: http://www.cveoy.top/t/topic/6w8 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录

  • 上一篇: vue-routeresmjs8c4f2100 Uncaught in promise NavigationDuplicated _name NavigationDuplicated name NavigationDuplicated message Navigating to current location csa=244 is not allowed stack Errorn at n
  • 下一篇: 民间非盈利如何做结转到非限

© 2019 • 2025 - 安全问答 站长邮箱:wxgpt@qq.com    ICP备案/许可证号:豫ICP备2024104334号-2