思路:先得到两个数,然后得到第一个数的乘积,然后取模第二个数
-----------------------------------------------------------------------------------------------
using System;
using System.Numerics;namespace _1008_N的阶乘modP
{
class Program
{
static void Main(string[] args)
{
int number1;
int number2;
string[] sr = Console.ReadLine().Split(' ');
number1 = Convert.ToInt32(sr[0]);
number2 = Convert.ToInt32(sr[1]);
BigInteger count = 1;
for (int i = 2; i <= number1; i++)
{
count *= i;
}
Console.WriteLine(count % number2);
}
}
}