CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #932 #934 →

#933. LCM of a list

Find the least common multiple (LCM) of all elements of the list. ### Input The first line has n, the second line has n integers separated by spaces. (numbers from 1 to 20) ### Output A number.

Examples

Input
4
10 3 12 17
Output
1020
Input
3
6 11 8
Output
264

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!