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

14000번 - List of Primes 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB70312340.351%

문제

Lidia likes sets of prime numbers. When she is bored, she starts writing them down into the Extremely Long Notebook for Prime Sets.

Elements of each set are written down in ascending order. Each set of prime numbers appears in her notebook eventually. A set with a smaller sum always appears before a set with a larger sum. Sets with the same sum are sorted in ascending lexicographical order: they are compared by the first element, if the first elements are equal, then by second element, and so on.

Just in case someone decides to parse her notebook, she writes down her sets in a machine-readable JSON format. Of course, she puts a space after each comma. Here’s the beginning of her notebook:

[2], [3], [2, 3], [5], [2, 5], [7], [3, 5], [2, 7], [2, 3, 5], [3, 7], [11], [2, 3, 7], [5, 7], [2, 11], [13], [2, 5, 7],

Lidia wants to double-check her work, so here is her request for you: given two integers, a and b, output a substring of her notebook from the position a to the position b (inclusive, counting from 1).

입력

The first line contains two integers, a and b (1 ≤ a ≤ b ≤ 1018; b − a ≤ 105 ).

출력

Output the substring of the notebook described in the problem statement from the position a to the position b. You must write a line with exactly b − a + 1 characters, including any leading and/or trailing spaces.

제한

예제 입력 1

1 35

예제 출력 1

[2], [3], [2, 3], [5], [2, 5], [7],

예제 입력 2

36 41

예제 출력 2

 [3, 5

힌트

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > NEERC 2016 L번

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

출처

대학교 대회

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

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