아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Find Terrorists

시간 제한5초메모리 제한1024 MB

요약
각 구간 [L, H]에서 약수의 개수(1과 자기 자신 포함)가 소수인 정수를 모두 오름차순으로 출력하고, 없으면 -1을 출력한다.
난이도

보통10점 중 4점

유형
정수론, 완전 탐색, 수학
정답자
아직 제출이 없습니다

문제

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

  1. 예제 1

    입력
    3
    1 1
    1 2
    2 5
    
    예상 출력
    -1
    2
    2 3 4 5