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

30137번 - Find Terrorists 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 1024 MB72393258.182%

문제

The Prime Minister and his Accumulated Council of Ministers (ACM) are trying hard to find all possible terrorist locations. In his dream, the Prime Minister gets a message from God suggesting that the answer to all terrorist problems are numbers (say one such number is X) such that the number of factors of X(including 1 and X) is prime. These numbers supposedly contain the encrypted locations of terrorists. Since the ACM has no programmer, the Prime Minister needs your help in finding out such numbers.

Note: 1 is not considered a prime number.

입력

The first line of input will contain an integer T ≤ 20 denoting the number of test cases.

T lines follow, one per test case.

Each test case will be a line formatted as "L H" where L and H are integers and 0 ≤ H ≤ 10000

출력

Output one line per case a space separated list of all integers(sorted ascending) lying between L and H (both inclusive) such that the number of factors of each integer is prime. In case no such integer exist output -1.

제한

예제 입력 1

3
1 1
1 2
2 5

예제 출력 1

-1
2
2 3 4 5

힌트

출처

ICPC > Regionals > Asia West Continent > India > The 2008 Asia Amritapuri Contest I번

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

출처

대학교 대회

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

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