Let b >= 2 be an integer and (v) over cap a real number. Among other results, we compute the Hausdorff dimension of the set of real numbers xi with the property that, for every sufficiently large integer N, there exists an integer n such that 1 <= n <= N and the distance between b(n) xi and its nearest integer is at most equal to b(-(v) over capN). We further solve the same question when replacing b(n)xi by T-beta(n)xi, where T-beta denotes the classical beta-transformation.