Input
两个数N,P,中间用空格隔开。(N < 10000, P < 10^9)
Output
输出N! mod P的结果。
Input示例
10 11
Output示例
10
import math a,b = map(int,input().split()) s = math.factorial(a)%b print(s,"\n")在一行输入多个变量,
a,b = input().split()
此时的a,b都是字符型
如果需要数值型
a,b = map(int,input().split())
在math库中有阶乘函数,math.factorial()