using System;
using System.Numerics;
public class ExempleModulo
{
public static void Main()
{
BigInteger nombre = 10;
int exposant = 3;
BigInteger modulus = 30;
Console.WriteLine("({0}^{1}) Mod {2} = {3}",
nombre, exposant, modulus,
BigInteger.ModPow(nombre, exposant, modulus));
}
}