Number Theory for Competitive Programming Using Python - Sum of n numbers, GCD and LCM

preview_player
Показать описание
1.Sum upto n
2.Gcd
3.Lcm

#CompetitiveProgramming #ProgrammingKnowledge #NumberTheory #Python
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Shorter recursive :)


def GCD(a, b):
return a if b==0 else GCD(b, a%b)

kacpermokrzycki
Автор

Shorter codes:
1. Sum of n[s] = return int(n * (n + 1) / 2)
2. GCD = if m == 0: return n; return gcd(m, n % m)
3. LCM = prod = n * m; hcf = gcd(n, m); return int(prod / hcf)
Thanks :)

EintsWaveX
Автор

Good work. I was always waiting for this series

jitinkrishnamadineni
Автор

I want full competative programming course in python including dynamic programming etc.
I can pay .

SachinKumarK-MC-
Автор

bro you are insane! thanks god you exist! thank you so much! this is the best python course ever! Soon I will be member of your channel, thank you a lot!

jvcss
Автор

Wow i' m really thankful to you for starting this kinda course please continue with this ....
Bt plz try to update your audio & plz try to make more & more video on that
best of luck :)

moviemania
Автор

can you please tell what are the prerequiites for this course??

pythonenthusiast
Автор

while 1:
print('basically')

amansinghbhadauria
Автор

Your "gcd" program assumes b>a. Which is not necessarily the case every time. This was a great introduction but lacking corner case checks.

mrseanpaul
Автор

We are not here to see what you are doing !! Make us understand the whole code.

ovoydas
Автор

Suggest some practice books for python competitive programming

harishkatariya
Автор

Please also do it in C++ as C++ is bit faster than python...Just open a file in which c++ code is written and explain the code via comparison with python. It would take just extra 2 minutes only..
Thanks for this series too....

KrishnaGupta-ngtv
Автор

Sir is it necessary to write the codes exactly as u mentioned. Can we write it in our own way if it gives correct result and logically correct as well ?

captianbradsword
Автор

hello Django boy hpy to see u in this series. I am not happy with your Django series try to push up the speed.

KrishnaManohar