← All problemsSign in

Golu and Sweetness

Golu and his friend are busy preparing dishes for the winners of this contest. There are N dishes in the menu. Golu assigns a sweetness factor to each dish. His friend is curious about this sweetness factor and decides to ask him Q queries about that. In each query, he asks Golu to count the number of numbers in range [l,r] whose sweetness factor is a prime number. Sweetness Factor of a number

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start