Sort by

recency

|

47 Discussions

|

  • + 0 comments
    mod=1000000007
    def solve(a, b):
        # Write your code here
        a=int(a)
        b=0
        for i in b:
            b=(b*10+int(i))%(mod-1)
        return pow(a,b,mod)
    
  • + 0 comments
    MOD = 10**9 + 7
    
    def mod_expo(base, exponent, modulus):
        result = 1
        base = base % modulus
        while exponent > 0:
            if exponent % 2 == 1:
               result = (result * base) % modulus
            exponent = exponent >> 1
            base = (base * base) % modulus
        return result
    
    T = int(input().strip())
    for _ in range(T):
        A, B = map(int, input().split())
        print(mod_expo(A, B, MOD))
    

    https://retrobowlcollege.com/

  • + 0 comments

    AP government jobs AP Home Guard Jobs 2022 Apply for Home Guard Vacancy in AP. Latest Notification for AP Home Guard Recruitment 2022. Get loose Jobs Alert 2022 AP Home Guard Vacancy 2022.

  • + 2 comments

    Remember AOL conversation channels and downloading tunes through Napster? The web has advanced altogether.Today, it's overpowered by Meta, Google Verse and a humble bundle of other tech beasts whose organizations have simplified it for billions of people to confer and share content on the web.

    • + 1 comment

      Black Friday Sales are the best time to buy products at discounted prices. These sales occur on the day after Thanksgiving and they are the biggest shopping event of the year. Black Friday Deals 2022 is a term used to describe the day after Thanksgiving, where retailers offer discounts on their products. The purpose of these sales is to get people to spend money on items that they may not have bought otherwise. Most stores offer door-buster deals, which means that the price of the product drops significantly right before the sale ends. Stores hope that customers will purchase these items, even though they might not normally buy them. There are no crowd to find good products. Greatest deals available on this day.

      • + 0 comments

        There's a 3-column SUV calling out to you. It offers dependable execution and brilliant interior highlights Tesla Model 3 Colors The 2022 Toyota Highlander freight area and factors permit up to 8 tourists and all your tools to fit serenely on your Old Saybrook journey. Look on the 2022 Toyota Highlander interior tones, factors and factors with the group at…

  • + 0 comments

    C# usin BigInteger (otherwise - russian peasant algorithm):

    private static int longStrToModNum(string a, int m)
    {
        int offs = 18, len = a.Length, idx = len - ((len-1)%offs + 1);
        long fctr = long.Parse($"1{new string('0', (len-1)%offs + 1)}") % m, res = long.Parse(a.Substring(idx)) % m;
        long mod10s = long.Parse($"1{new string('0', offs)}") % m;
        while (idx > 0)
        {
            idx -= offs;
            res = (res + long.Parse(a.Substring(idx, offs)) % m * fctr % m) % m;
            fctr = fctr * mod10s % m;
        }
        return (int)res;
    }
    public static int solve(string a, string b)
    {
        return (int)BigInteger.ModPow(longStrToModNum(a,1000000007), longStrToModNum(b,1000000006), 1000000007);
    }
    

    ...not that speedy, but passing all tests