#nt505. 区间筛
区间筛
Segmented Sieve
Problem Description
Given two numbers , find all primes in the range .
To keep the output from being too large and to prevent precomputing answers from a table, you are also given ; output the XOR sum of over all such primes.
Input Format
The first line contains four integers .
Output Format
Output one integer: the answer.
Sample Input
1 100 1 0
Sample Output
64
Constraints
For all data, , , .