Back

how to find the lcm value and how to solve this code

Created 2 years ago
756 Views
1 Comments
AyesharbB5ZU
@AyesharbB5ZU
AyesharbB5ZU
@AyesharbB5ZUProfile is locked. Login

Write a program to get a list of integers as input and find the LCM of the values without using GCD

Input Description:
First line contains an integer N, number of values. Second line contains N space separated values.

Output Description:
Print the LCM of the values.

Sample Input :
1 2 3 4 5
Sample Output :
60

Comments
Please login to comment.