Problem Statement
Find the smallest number that is divisible by all the integers between 1 and n, inclusive, and return it modulo 987654321.
Definition
- Class:
- OneTwoThree
- Method:
- minimalNumber
- Parameters:
- int
- Returns:
- int
- Method signature:
- int minimalNumber(int n)
- (be sure your method is public)
Constraints
- n will be between 1 and 100000, inclusive.
Examples
1
Returns: 1
3
Returns: 6
The smallest number divisible by 1, 2 and 3 is just 1 * 2 * 3.10
Returns: 2520
1234
Returns: 411860547
97969
Returns: 528039414