← SAP questions

Count prime numbers in range with digit constraints

Filed under SAP

Given two integers `l` and `r`, find the count of prime numbers in the inclusive range `[l, r]` such that all digits of the prime are odd and strictly less than 5 (i.e., every digit must be either 1…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related SAP questions

Collected from public candidate posts and coding forums. Updated Nov 2026.