PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000046. Bội chung dương nhỏ nhất của nhiều số (Smallest Multiple)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Bội chung dương nhỏ nhất của nhiều số (Smallest Multiple)
Smallest Multiple
Source: Kattis
Version: Phuoc Hung OJ Extended
Problem Statement
Given a single line of positive integers, find their least positive common multiple. The answer may exceed 64-bit integer capacity; print all of its decimal digits exactly.
Input
One line with positive integers , separated by spaces; no leading count .
Output
Print the exact decimal LCM.
Subtasks
- Subtask 1 (20 points): ; (Phuoc Hung OJ version bound)
- Subtask 2 (30 points): ; (Phuoc Hung OJ version bound)
- Subtask 3 (50 points): ; (Phuoc Hung OJ version bound)
Examples
Input
4 6 10
Output
60
Explanation
The LCM of is ; taking the LCM with yields .