why this code gives wrong answer?
instead of scanf if I use cin then it gives ac. why?
YES, i got it from this .
Many people done using LCM because the problem name is “CLCM” LOL
Two interesting coder's legacy 2020 problems for beginners 🔥🔥 - Flying concepts of C.P. - YouTube Solution video of this “first” and second question of coder’s legacy 2020
what if I use long long int, will it still overflow?
Yes, it will. Let’s think if I give you at least ~20 prime number then their lcm will overflow for sure.
Can you please specify some primes under these constraints, which cause integer flow? I’m surprised to see.