Rosetta Problems

Segmented sieve

https://marisaoj.com/problem/103