P28337 [洛谷] [Code+#1] Morning Run
普及
题目描述

Problem Description

"No sports, no Tsinghua," "Exercise for one hour every day, work healthily for fifty years, and live happily for a lifetime."

In Tsinghua, physical exercise is definitely an integral part of students' lives. To respond to the school's call, the model student Captain Wang has decided to stick to morning runs. However, due to various reasons, it is not realistic to wake up early every day for a run. Therefore, Captain Wang has decided to run every \(a\) days. In other words, if Captain Wang wakes up early to run one day, he will rest for \(a-1\) days, and then continue to run on the \(a\)-th day, and so on.

Captain Wang's good friends, Xiao Qin and Xiao Zhen, are deeply inspired by Captain Wang's persistence in exercise and decide to stick to morning runs themselves. To suit their own situations, Xiao Qin decides to run every \(b\) days, and Xiao Zhen decides to run every \(c\) days.

One morning, Captain Wang, Xiao Qin, and Xiao Zhen met while running early. They were very excited, encouraged each other, and completed a perfect morning run together. For convenience, we mark the day they met as the 0th day. Assuming that the three students always run during the same time period and on the same route, they want to know on which day they will meet again while running. Since none of the three can calculate this, they hope that the clever you can tell them the answer.

Input Format

The input consists of a single line containing three positive integers \(a, b, c\), representing that Captain Wang runs every \(a\) days, Xiao Qin runs every \(b\) days, and Xiao Zhen runs every \(c\) days.

Output Format

The output consists of a single line containing a positive integer \(x\), indicating the day on which the three students will meet again.

Sample Input and Output

Sample Input #1

2 3 5

Sample Output #1

30

Sample Input #2

3 4 6

Sample Output #2

12

Sample Input #3

10 100 1000

Sample Output #3

1000
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 3 5
样例输出
30