codeforces/621C_flowers.py
def prob(self, l, r, p):
        """ Probability of a number in range divided by prime """
        w = r - l + 1
        lm = l % p
        rm = r % p
        n = (r - rm - (l - lm)) // p
        if lm == 0:
            n += 1
        return n / w
 Probability of a number in range divided by prime 
Probability of a number in range divided by prime
Probability of a number in range divided by prime
def prob(self, l, r, p):
        w = r - l + 1
        lm = l % p
        rm = r % p
        n = (r - rm - (l - lm)) // p
        if lm == 0:
            n += 1
        return n / w
def prob ( self , l , r , p ) : w = r - l + 1 lm = l % p rm = r % p n = ( r - rm - ( l - lm ) ) // p if lm == 0 : n += 1 return n / w
Probability of a number in range divided by prime
Probability of a number in range divided by prime
""" Probability of a number in range divided by prime """
self
l
r
p