Fundamentals
using System.Numerics; public class basic { public static BigInteger pow(long down, long up) { return up == 0 ? 1 : down * pow(down, up - 1); } }
- using System.Numerics;
- public class basic
- {
- public static BigInteger pow(long down, long up)
- {
BigInteger power = 1;for (long i = 0; i < up; i++)power *= down;return power;- return up == 0 ? 1 : down * pow(down, up - 1);
- }
- }