Pr0gramer icon

Students and apples Calculator

Pr0gramer | PRO | 05/29/17 12:58:49 AM UTC | 0 ⭐ | 404 👁️ | Never ⏰ | []
Python |

330 B

|

None

|

0 👍

/

0 👎

# If N students take K apples and distribute them among each other evenly.
# The remaining (the indivisible) part remains in the basket.
 
students = int(input())
apples = int(input())
 
# How many apples will each single student get?
print (apples // students)
 
# How many apples will remain in the basket?
print (apples % students)

Comments