Tuesday, August 29, 2017

An Interesting Number Theory Problem from CSAcademy(Round #43)

Hi guys! ✋
rachit jain blog, Rachit Jain, rachit jain iit roorkee, rachit jain iitr, rachit iitr,rachit codechef, rachit hackerrank, rachit jain microsoft

This is a greedy, math problem from CSAcademy Round #43.
You are given two integers $N,K$ and you are required to print an array of $N$ distinct integers $<10^6$ such that there are exactly $K$ pairs $(a[i], a[j])$ with their gcd as $1$.  
Check out the following video where I've described the solution:
CSAcademy Round 43 - Coprime Pairs Tutorial (Number Theory)

Refer the Video Description to find the links to source code and problem link.
The family 💓 has grown to 600+ subscribers and I thank you guys for the love and support :)  

If you liked my efforts, please hit the like button 👍, subscribe and share the videos among your college :D  

Have a good day! 😆


1 comment:

Art of Time Management | Achieving Multiple Things in Life

rachit jain blog, Rachit Jain, rachit jain iit roorkee, rachit jain iitr, rachit iitr,rachit codechef, rachit hackerrank, rachit jain micr...