[CSES][Mathematics] Divisor Analysis

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии •

  • @citizendot1800
    @citizendot1800 3 года назад +6

    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

  • @teerthsatwara3394
    @teerthsatwara3394 9 месяцев назад

    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?

  • @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: ruclips.net/video/jkZ6c-uAl7Y/видео.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 года назад +5

      @@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

  • @wedonotgogymnow
    @wedonotgogymnow 2 года назад

    amazing job!

  • @injarapugopichandu1824
    @injarapugopichandu1824 Год назад

    thank you sir