100 atcoder#ABC070C. [ABC070C] Multiple Clocks
[ABC070C] Multiple Clocks
Score : points
Problem Statement
We have clocks. The hand of the -th clock rotates through in exactly seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
Constraints
- All input values are integers.
- The correct answer is at most seconds.
Input
Input is given from Standard Input in the following format:
Output
Print the number of seconds after which the hand of every clock point directly upward again.
2
2
3
6
We have two clocks. The time when the hand of each clock points upward is as follows:
- Clock : , , , seconds after the beginning
- Clock : , , , seconds after the beginning
Therefore, it takes seconds until the hands of both clocks point directly upward.
5
2
5
10
1000000000000000000
1000000000000000000
1000000000000000000