Exercises/#75 Count Primes
#75

Count Primes

MediumπŸ”’ Math & Numbers
70 XP

Problem

Given an integer n, return the count of prime numbers strictly less than n.

Examples

Input: n=10
Output: 4 (2,3,5,7)

Input: n=0
Output: 0
mathsieve
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

75 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features