The rounding function is a common function. Its form is simple, its nature is very unique, and it is widely used in the problems of seeking limits, seeking and integrating. Applying the nature of the rounding function, a mapping of the real number set of the beer bottle to the beer to a set of inte-gers is established, and any real number is converted into an integer to solve how to optimize the beer. By transforming the problem of beer bottle change for beer in supermarket promotion into a mathematical model, some results are derived according to the nature of the rounding function; and the mathematical model is deeply explored and extended theoretically, and a general conclu-sion is obtained. Combined with the conclusions we have obtained, the conclusions are further ap-plied to simplify the actual problems.