[CSES][Mathematics] Divisor Analysis

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 23

  • @citizendot1800
    @citizendot1800 3 роки тому +5

    1:38 - Number of Divisors
    6:54 - Sum of Divisors
    13:04 - Product of Divisors

  • @mos6112
    @mos6112 2 роки тому +2

    I got this video recommended on google search for solution to this problem, and OH MY GOD!!! THANK YOU SO MUCH!!! You gave such detailed explanation, even the little things that people miss on, like even mentioning the exponent laws, such videos are very helpful for people dumb like me! Please keep continuing with such teaching style. I'm subscribed!!!!

  • @harrisondong5405
    @harrisondong5405 Рік тому +1

    Good explanation! Not only the formula but also details on how to work out them.

  • @ArnabJhaYT
    @ArnabJhaYT 2 роки тому +2

    thank you sir, i will revisit this problem again

  • @kamilkostya8600
    @kamilkostya8600 2 роки тому

    amazing job!

  • @iamanonymous5572
    @iamanonymous5572 3 роки тому +3

    I didn't understand why we use (mod-1) for calculating outerexp. Please explain me in brief :)

    • @neatlystructured
      @neatlystructured  3 роки тому +1

      It is due to fermat little theorem. To understand it better, i invite you to watch this video: ua-cam.com/video/jkZ6c-uAl7Y/v-deo.html

    • @iamanonymous5572
      @iamanonymous5572 3 роки тому

      @@neatlystructured that problem is a^b^c. But here we use (a^b)^c, isn't it? Correct me if I'm wrong.

    • @neatlystructured
      @neatlystructured  3 роки тому +1

      @@iamanonymous5572 those two formulae are equal: a^b^c = (a^b)^c

    • @iamanonymous5572
      @iamanonymous5572 3 роки тому

      @@neatlystructured (a^b) ^c=a^bc isn't it? Like (5^2)^3=5^2*3=5^6 and 5^2^3=5^8 am I correct?

    • @neatlystructured
      @neatlystructured  3 роки тому +4

      @@iamanonymous5572 i am so sorry, i totally misunderstood what you were saying and what i said is totally wrong. i referred you to that problem because we proved that a^(p-1)=1 mod p and in this problem we indeed have a different form from the one in the other problem. Here we have (a^b)^c which is equal to a^(b*c) as you said. so in this problem, the product b*c can be very large so we use the theorem to calculate the product mod (p-1) and without this we wont be able to calculate it. and something slightly different was going on with the other problem, we couldnt calculate b^c so we needed to use the same reduction and calculated b^c mod p-1 using binary exponentiation. I apologize again for my previous comment.

  • @Manishkumar-mw2zw
    @Manishkumar-mw2zw Рік тому

    nice explaination

  • @teerthsatwara3394
    @teerthsatwara3394 7 місяців тому

    i didnt understand the logic behind using a loop for looking for positionOfOddExponent as the last odd exponent in the vector will overwrite all the previous odd exponent. Like why dont you break upon getting the first oddExponent

  • @itssidhere
    @itssidhere 2 роки тому

    Isn't product of divisor logic n^2? I am getting TLE on a test case

    • @neatlystructured
      @neatlystructured  2 роки тому

      As you saw in the video! this approach got accepted! can you share your submission?

  • @injarapugopichandu1824
    @injarapugopichandu1824 Рік тому

    thank you sir