Given distinct prime numbers $p_1,\ldots,p_s$ and a positive integer $n$, find the number of positive integers not exceeding $n$ that are divisible by exactly one of the $p_i$.
Source: Mongolia MO 2000 Teachers P6
Tags: number theory
Given distinct prime numbers $p_1,\ldots,p_s$ and a positive integer $n$, find the number of positive integers not exceeding $n$ that are divisible by exactly one of the $p_i$.