Pr0gramer

Students and apples Calculator

May 28th, 2017
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # If N students take K apples and distribute them among each other evenly.
  2. # The remaining (the indivisible) part remains in the basket.
  3.  
  4. students = int(input())
  5. apples = int(input())
  6.  
  7. # How many apples will each single student get?
  8. print (apples // students)
  9.  
  10. # How many apples will remain in the basket?
  11. print (apples % students)
Advertisement
Add Comment
Please, Sign In to add comment