title: Count multiple of a number in a given range with O(1) complexity?
body: <p><strong>We are given three numbers, L, R and K. We need to count numbers between L and R (inclusive both) which are divisible by K.</strong></p>
  
  <p>Is it possible to solve with O(1) complexity?</p>
  
  <p>It is a very simple program I know, can be easily done with a loop. But I was wondering if it is possible to apply some kind of formula or something to directly know the count of numbers which are divisible by K between L and R.</p>
  
  <p>For example, <code>count = (R - L + 1) / K</code> will probably work in some of the cases.</p>
  
  <p>Anything?</p>