YouTip LogoYouTip

Python Exercise Example80

# Python2.x Python Exercise Instance 80 [![Image 3: Python 100 Examples](#) Python 100 Examples](#) **Question:** There is a pile of peaches on the beach, and five monkeys come to divide them. The first monkey divides the pile of peaches into five equal parts, with one left over. This monkey throws the extra one into the sea and takes one part. The second monkey divides the remaining peaches into five equal parts again, with one left over again. It similarly throws the extra one into the sea and takes one part. The third, fourth, and fifth monkeys all do the same. What is the minimum number of peaches originally on the beach? **Program Analysis:** None. ## Instance (Python 2.0+) #!/usr/bin/python# -*- coding: UTF-8 -*-if __name__ == ' __main__ ': i = 0 j
← Python Exercise Example81Python Exercise Example79 β†’