Sort by

recency

|

86 Discussions

|

  • + 1 comment

    If you want to face any query digital marketing Austin team to solve and provide a better solution.

  • + 0 comments

    C# similar to Java:

    private static int gcdExtended(int a, int b, out int x, out int y)
    {
        if (a == 0)
        {
            x = 0; y = 1;
            return b;
        }
        int gcd = gcdExtended(b % a, a, out int x1, out int y1);
        x = y1 - (b / a) * x1;
        y = x1;
    
        return gcd;
    }
    public static int solve(int a, int b, int x)
    {
        int fa = a;
        if(b < 0)
        {
            int gcd = gcdExtended(a, x, out fa, out int fb);
            fa = fa < 0 ? fa + x : fa;
        }
        return (int)BigInteger.ModPow(fa, Math.Abs(b), x); // powRussPeas(fa, b, x);
    }
    

    passed all tests

  • + 0 comments

    A very meaningful event, I hope everything will go well candy crush soda

  • + 0 comments

    This problem would be very difficult if the constraints aren't given properly. wazifa to make someone obsessed with you

  • + 0 comments

    The author clearly describe all the parts of the article with good language and information. Looking forward to another article. spanish dictionary