Problem description:
The approximate number of positive integers x is a positive integer that can divide X. The approximate number of positive integer x is counted as Div (X ). For example, 1, 2, 5, and 10 are all positive integers of 10, and Div (10) = 4. Let A and B be two positive integers, A ≤ B, and find the number X with the largest number of appointments between A and B.
Programming task:
For the given two positive integers A ≤ B, the approximate number between A and B is calculated by programming.
Data input:
The input data is provided by a text file named input.txt. The first row of the file has two positive integers A and B.
Result output:
At the end of the program, find the maximum number and maximum number of appointments between A and B.
Test data: [only the maximum number of approx., time limit: 1 S]
[1, 36] 9
[1000000,200 288]
[999998999,999 999999] 1024
[1, 1000000000] 1344
[999999999,100 0000000] 56
[100,100 0000000] 1344
Thoughts:
Let's take the factorization of a positive integer x
X = p1 ^ N1 × P2 ^ N2 × ...... Pi ^ Ni
Then Div (x) = (N1 + 1) (n2 + 1 )...... (Ni + 1)
Maximum number of questions