Count Primes in Range

JavaScript Medium 3 views
Back to Questions

Problem Description

Given L and R, count how many prime numbers are there in [L,R].

Input Format

One line: L R.

Output Format

One integer count.

Sample Test Case

Input:
1 20
Output:
8

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next