Exam path · Integer Counting
Integer counting questions, counted with a closed form
Integer counting questions ask how many integers in a printed range are multiples of one number, how many positive factors a number has, or how many integers are divisible by one number but not another. Count with a closed form: floor of the top divided by the step, minus floor of the number just below the bottom. Do not list the integers.
Prelims number-system sets ask this as 'how many numbers from A to B are divisible by K', a factor count, or divisible by one number but not another. Listing the range is how the clock runs out. The count is one subtraction.
Try it against the clock. Integer Counting runs at
30s easy, 40s medium and
55s hard. The clock is stamped and judged on our server, so the
limit you see is the deadline that is actually enforced — and it starts when you tap Start, not while
the question is loading.
Start a timed Integer Counting drill →
How to solve integer counting questions without listing
-
Inclusive multiples: floor(hi ÷ k) minus floor((lo − 1) ÷ k)
How many multiples of 3 from 6 through 28? floor(28/3) − floor(5/3) = 9 − 1 = 8. Both ends count when they are multiples.
-
Strictly between drops both ends
Strictly between 10 and 40 means from 11 through 39. Use the same formula on that inner range. Forgetting to drop an end that is itself a multiple is the usual off-by-one.
-
Divisible by k but not by m is two counts
Count the multiples of k, then subtract the multiples of the least common multiple of k and m. Subtracting the multiples of m on their own double-counts or under-counts when k and m share a factor.
-
Factor counts come from the prime powers, not from a list
If n = p^a × q^b, the number of positive factors is (a+1)(b+1). Odd factors ignore the factor 2. Square factors keep only the even exponents.
Three families this drill keeps
| What the paper asks | The move |
| Multiples of k from lo through hi | floor(hi/k) − floor((lo−1)/k) |
| Divisible by k but not by m | Multiples of k, minus multiples of lcm(k, m) |
| How many positive factors | (a+1)(b+1) from the prime powers |
| How many of those factors are odd, or squares | Drop the 2s, or keep even exponents only |
3 real integer counting questions, with worked solutions
Generated by the same engine that mints the ComputePrep daily. Each answer is computed
from the numbers printed in the question, and the walkthrough below each one is the engine's own working
— not a solution written afterwards. Reload this page's live drill and you get different numbers.
Question 1
How many 3-digit positive integers from 462 through 569, inclusive, are divisible by 18?
How many such integers are there?
- 7
- 31
- 32
- 6
- 9
Show the worked solution
- 3-digit integers in this question run from 462 through 569.
- floor(569/18) − floor(461/18) = 6.
- Answer: 6.
Question 2
How many 2-digit positive integers from 25 through 78, inclusive, are divisible by 19?
How many such integers are there?
- 5
- 8
- 9
- 3
- 4
Show the worked solution
- 2-digit integers in this question run from 25 through 78.
- floor(78/19) − floor(24/19) = 3.
- Answer: 3.
Question 3
How many 3-digit positive integers from 343 through 670, inclusive, are divisible by 47?
How many such integers are there?
- 6
- 14
- 8
- 15
- 7
Show the worked solution
- 3-digit integers in this question run from 343 through 670.
- floor(670/47) − floor(342/47) = 7.
- Answer: 7.
Common mistakes this drill is built from
The wrong options are not random numbers. Each one is the result of a specific careless error for this
topic, so picking one tells you which habit is costing you marks.
Listing the range
From 100 to 400 that is hundreds of integers. The closed form is two divisions. Listing is how a 40-second question becomes a skipped one.
Dropping an endpoint that is itself a multiple
From 6 through 28, 6 and 27 both count for multiples of 3. 'Through' and 'inclusive' mean both ends. 'Strictly between' means neither.
Subtracting multiples of m instead of multiples of lcm(k, m)
Divisible by 2 but not by 3 is not 'evens minus multiples of 3'. A multiple of 3 that is odd was never in the first count. Subtract multiples of 6.
Why your answer came out wrong
The specific wrong numbers this topic produces, and what each one tells you about the step
you took. If you have just got a question wrong and want to know which habit did it, start here.
How many multiples of 3 are there from 6 through 28 — why isn't the answer 7?
7 drops one end. floor(28/3) − floor(5/3) = 9 − 1 = 8. Both 6 and 27 are multiples and both sit inside an inclusive range.
How many numbers from 1 to 100 are divisible by 2 but not by 3 — why isn't it 50 − 33?
33 counts every multiple of 3, including the odd ones, which were never in the 50 evens. Subtract multiples of 6 instead: 50 − 16 = 34.
How many positive factors does 36 have — why isn't the answer 6?
6 is the count of prime factors with repeats, or a partial list. 36 = 2² × 3², so the factor count is (2+1)(2+1) = 9: 1, 2, 3, 4, 6, 9, 12, 18, 36.
FAQ
How do you count multiples in a range for bank exams?
For multiples of k from lo through hi, inclusive, the count is floor(hi ÷ k) − floor((lo − 1) ÷ k). Both ends count when they divide evenly. Strictly between drops both ends before you apply the same formula.
Are integer counting questions asked in IBPS and SSC prelims?
Yes, inside the number-system block: how many numbers between two limits are divisible by a given number, how many factors a number has, and divisible by one number but not another.
How long should an integer counting question take?
About 30 to 55 seconds. This drill enforces 30 seconds on easy, 40 on medium and 55 on hard, on the server.
Is this practice free?
Yes, free with no account. Every question is generated fresh, so the range is never the same twice.
Practise the next topic
Start a timed Integer Counting drill →
ComputePrep is free, needs no account, and is not affiliated with IBPS, SBI, SSC, RRB or
any exam authority.