eolymp
bolt
Try our new interface for solving problems
Problems

Primes at the interval 2

Primes at the interval 2

Two positive integers $a$ and $c$ are given. Find the minimum positive integer $b$ such that the number of prime numbers on the interval $[a; b]$ inclusively equals to $c$. \InputFile Two positive integers $a$ and $c\:(a, c \le 10^6)$. \OutputFile Print the minimum value of $b$. \includegraphics{https://static.eolymp.com/content/80/803h8l74kh4ircinbp22l8fdj4.gif}
Time limit 1 second
Memory limit 128 MiB
Input example #1
3 4
Output example #1
11