2023-06-22 Python - math.factorial(n):階乗 mathモジュール Python3 概要 インポート 実行結果 表示イメージ 概要math.factorial(n) n=int nの階乗を返す。 mathモジュール インポート import math 実行結果 import math print(math.factorial(5)) 表示イメージ 120