9-C language -B- questions 1: Title: change LingChao

Title: change LingChao

x planet banknote denomination only: 100, 5- 2, $ 1, a total of four kinds.
Xiao Ming go x Stars Tours, his hand only 2 x $ 100 star coins, too inconvenient, just passing through x Star Bank enchant change.
Zhang Xiaoming number a little obsessive-compulsive disorder, he insisted that 200 yuan Ling Chao swapped out in just $ 2 $ 1 10 times the number of sheets,
the rest of the course is 5 yuan denomination.

Bank staff a bit difficult, you can help calculate: Xiao Ming in the premise of meeting the requirements, at least give him want to change how many bills you?
($ 5 2, $ 1 denomination must have, is not 0)

Note that you need to submit is an integer, do not fill in any extra content.

for i in range(1,100):
    for j in range(1,100):
        if i+2*10*i+5*j==200:
           print(i+10*i+j)

answer:

74

Published 10 original articles · won praise 0 · Views 198

Guess you like

Origin blog.csdn.net/tianrandai12/article/details/104089064