Binary Exponentiation || Number Theory ( Added 19/07/2020)

Mathematics for Competitive Programming ( Course ) :green_circle:

Hi there, in this course I will be teaching Maths concept used in competitive programming with complete explanation with proofs and implementation in C++. This course is a Lengthy Course as it consists of many subtopics and concepts. So mastering this will take time and this can only be done with Practice.

Course Videos: Number Theory Playlist

Topics Covered till Today ( Explanations are focused in Mathematical Concept, Proof Intuition, and C++ Implementation )

With the above topic, we have covered all the fundamental Number Theory Concepts now from the next lecture and problems we will be diving into Modular Arithmetic where we will be studying many awesome concepts.

For Practice Problems Please visit the Main Course Page.

Course Mainpage:

Hope that this can help you.
Thank You


nice initiative

1 Like

Thanks for this initiative, it’s going to help many.

Thank You @hackraj & @anon18036669

Example of implementation of Sieve of Eratosthenes added,

New lecture added: NT5: Fundamental Theorem of Arithmetic & Prime Factorization

Lecture 6 added: NT6: Finding Number of Divisors

Practice problems related to Number of Divisor and Prime Factorization are added.

@praveen3277 I appreciate what you’re doing but Code NCode already have a preety good playlist on number theory. (You can check this here.)

@marksman I know and hence I am not solving the same problem ( And some may intersect for concept explanation ) from Codeforces/CodeChef which @waqar_ahmad224 has already done. And my lectures are more oriented towards the mathematical proof of correctness which can be used by someone who wants to know why things are happening in a particular way before writing the code.

Anyway if we have multiple resources to learn then there is no problem, right? And with this, I am also learning many things.

And I also want to build this site dedicated to Competitive Programming with all resources available freely which can be used by many of us.


Awesome initiative. As a beginner in competitive programming, i have mediocre math skill implementation on code. I will make sure to follow your channel and also recommend it to my other friends.

Thank you @igorthehuman3

1 Like

Added implementation code for prime factorisation and for finding number of divisor.

New lectures are problem uploaded on Euclid’s Algorithm, GCD , Relation between LCM and GCD,
Properties of GCD will be uploaded by evening.

Properties of GCD and Practice Problems Posted.

Hi guys,
Practice problem set 1 added which consists of problems from all 9 lectures.
Before moving to the Modular arithmetic concepts and problems do solve then.

From tomorrow we will be looking into Modular Arithmetic and will be solving problems related to it.

If you have any specific problem related to any of the discussed topics above you can share with me, I will try to solve it and explain it to you and I will also learn some things from it.

Thank You.

Added introductory lecture for Modular Arithmetic.

Lecture NT11: Binary Exponentiation added.