Prime factors of lcm of an array

sir i was practicing a question of prime factors and i have made the code of question. It is not showing any error but not working . so please tell me where is the error in my code.
The question --> https://practice.geeksforgeeks.org/problems/prime-factors-of-lcm-of-array-elements3940/0/#

My Code --> https://ide.codingblocks.com/s/470981

hello @tejuschaturvedi0

u havent written any logic.

pls check ur code link and share the complete code with me

sir my code is not working . please tell my error.

https://ide.codingblocks.com/s/472387. reverse the string

u cant change array size i,e u have declare 0 size array so it will remain 0 forever,

sir i am getting you. i am not able to make the code .

check now->

declare a large size array.

sie but how only declaration is the issue. If we don’t give size then can it automatically not take the input according to the program.

no , not in the case of static array.

if we use vector then we can do it

the code is working for 100 size array only. but it is asked in question that N can be 10000000. code is showing segmentation fault for that.

ss

workig fine on my side , pls clear ur cache and then try to submit again

sir i was practicing a question of prime factors but i am notr able to code it. so please code it for me, so that i can understand the code .The question --> https://practice.geeksforgeeks.org/problems/prime-factors-of-lcm-of-array-elements3940/0/# . you can code here --> https://sapphireengine.com/

check its editorial ,it has code along with explanation.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.