Programing language : python3
方案一
1 #! /usr/bin/env python 2 # -*- coding:utf-8 -*- 3 # 计算1024的阶乘 4 factorial = 1 5 for i in range(1, 1024 + 1): 6 factorial = factorial * i 7 print("1024! =", factorial)
方案二
1 #! /usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import math 4 print("1024! =", math.factorial(1024))
原文地址:https://www.cnblogs.com/huanu/p/9246050.html
时间: 2024-10-18 18:45:29