Logo
(追記) (追記ここまで)

5768번 - Divide and Conquer 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB25521217989.950%

문제

Given two integers M and N, with 1 ≤ M ≤ N ≤ 5000, you must determine the integer numbers X and Y such that

  • A. M ≤ X ≤ N; and
  • B. Y is the number of divisors of X; and
  • C. Y is the largest possible; and
  • D. X is the largest possible.

입력

Your program should process several test cases. Each test case is composed by a single line contain- ing the two integers M and N (1 ≤ M ≤ N ≤ 5000). The end of input is indicated by M = N = 0.

The input must be read from standard input.

출력

For each test case in the input your program should print a single line, containing the two integers X and Y, separated by a space character.

The output must be written to standard output.

제한

예제 입력 1

1 5
300 500
4500 5000
0 0

예제 출력 1

4 3
480 24
4680 48

힌트

출처

ICPC > Regionals > Latin America > Latin America Regional Contests > South America Regional Contests 2003 연습 세션 PA번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /