blog about programming, and neighboring/random things.
private bool IsPerfectSquare(BigInteger n) { var sqrt = (BigInteger)Math.Round(Math.Exp(BigInteger.Log(n) / 2)); return (sqrt * sqrt) == n; }
No comments:
Post a Comment