0

Python related challenge

I want a program which would return max number of people getting the money. Eg: There is a â‚č10 note given and it said that distribute â‚č3 each one in the room. There are 10 people in the room. How would I calculate that this much people got â‚č3. I tried with floor divison operator but here I needed how much people would get the money, given the number of rupees to be distributed that to using input function.

30th Mar 2022, 6:05 PM
<k>Kartik</k>
1 Answer
+ 1
#Take input of people. people=int(input()) #Take input of money. ... #Take input of each. ... share= money // each result= people -(people-share) print(result)
30th Mar 2022, 7:23 PM
HungryTradie
HungryTradie - avatar