How to realize the problem of buying a hundred chickens for a hundred yuan by Python
The main content of this article is to explain "how Python can realize the problem of buying a hundred chickens for one hundred yuan". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let's let the editor take you to learn how Python can realize the problem of buying a hundred chickens for one hundred yuan.
In his Shujing, Zhang Qiujian, an ancient Chinese mathematician, put forward a famous problem of "buying white chickens with one hundred dollars." Chicken Weng one, five valuable, one mother, three chicks, one valuable, one hundred dollars to buy white chickens, ask Weng, mother and chicks?
C code:
/ * on the fifth day, a hundred yuan buys a hundred chickens * / # include # include void main (void) {/ * represents a rooster, a hen and a chicken, respectively, and the number of schemes * / int cock,hen,chick,i = 1 for (cock = 0)