#P1865. A % B Problem
A % B Problem
Description
Given , find the number of primes in the interval .
Input Format
The first line contains two integers, the number of queries and the maximum value of the right endpoint .
Then follow lines, each with two integers , representing one query.
Output Format
For each query, output one line. If , output the number of primes in the interval; otherwise, output Crossing the line.
2 5
1 3
2 6
2
Crossing the line
Hint
Constraints
- For of the testdata, .
- For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号