Join Regular Classroom : Visit ClassroomTech

Hackwithinfy 2021 Solution | N/2 Code

Question: N/2 Code

Approch: 

1. Pick the second most highest element
2. pick the lowest element
3. Find the GCD of the two
4. Take a for loop with n//2 times 
5. Delete elements as two and multiply each GCD with i
6. Take the Sum of it and You will get your answer

Solution:

Coming Soon.....

Follow Us

You Missed