#SP0000027. Nhiều ước nhất trên đoạn (Divisors)
Bài tập thuộc lộ trình
Mục lục đề ⌄
Nhiều ước nhất trên đoạn (Divisors)
Divisors
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
Two integers and define an inclusive integer interval . For an integer in this interval, let denote the number of its positive divisors, including and .
Find an integer in maximizing . In a tie, choose the smallest such integer. Also determine .
Input
One line containing integers and , the inclusive lower and upper endpoints.
Output
Print one line exactly in the form Between L and U, P has a maximum of D divisors. using the computed values. Preserve capitalization, commas, spaces and the final period.
Subtasks
- Subtask 1 (20 points): ; .
- Subtask 2 (30 points): ; .
- Subtask 3 (50 points): ; .
Examples
Input
1 10
Output
Between 1 and 10, 6 has a maximum of 4 divisors.
Explanation
The numbers , , and each have positive divisors. The divisors of are . No number in has more than divisors, and is the smallest maximizer.
Input
1000 1000
Output
Between 1000 and 1000, 1000 has a maximum of 16 divisors.
Explanation
The interval contains only , which has divisors. Hence .