# breaking it down medium

The Field Trip Split

The bus bill lands on the class. Split it evenly among the kids β€” teachers ride free β€” and a few kids toss in one extra coin for the remainder. 🚌

You get the total cost and the number of kids. Everyone pays cost Γ· kids (rounded down); the remainder tells how many kids pay one coin extra. Print each <base amount> extra <number of kids paying one more>.

Example:

Input: cost = 100, kids = 8 Output: each 12 extra 4

100 Γ· 8 = 12 remainder 4, so everyone pays 12 and 4 kids chip in one extra coin.

πŸ’‘ need a hint?

brk-field-trip-split.pyπŸ”’ given lines are locked β€” write your code in between
loading...