Luogu’s Python language for writing questions | P1421 Xiaoyu buys stationery

Learn Python from a young age! Record the questions in the Luogu Python learning and exam preparation process, and record every moment.

Attached is a summary post: Luogu’s Python language | Summary_Blog of a communicator who loves programming-CSDN Blog


[Title description]

The head teacher gave Xiaoyu a task to buy as many signature pens as possible in the stationery store. It is known that the price of a signature pen is 1 yuan and 9 cents, and the money given to Xiaoyu by the head teacher is  a  yuan  and b  cents. Xiaoyu wants to know how many signature pens she can buy at most.

【enter】

The input is only one line of two integers, denoting  a  and  b respectively .

【Output】

Output an integer per line, indicating how many signature pens Xiaoyu can buy at most.

【Input sample】

10 3

【Output sample】

5

[Detailed code explanation]

a,b = [int(i) for i in input().split()]
money = a*10+b 
num = money//19 
print(num) 

【operation result】

10 3
5

Guess you like

Origin blog.csdn.net/guolianggsta/article/details/132775454