leetle

Daily challenge for 2026-11-05

674. Leftover Sheet Stickers

You are organizing an event and need a certain number of stickers, needed. Stickers are only sold in sheets, where each sheet contains per_sheet stickers.

You must purchase the minimum whole number of sheets required to obtain at least needed stickers. Return the number of unused (leftover) stickers you will have after meeting your requirement. If needed is 0, you do not need to buy any sheets, so 0 stickers are left over.

Constraints:
The required sticker count is a non-negative integer at most 1,000,000,000. Each sheet holds a positive integer number of stickers at most 1,000,000. Zero required stickers produces zero unused stickers.

Example:
Input: needed = 14, per_sheet = 5
Output: 1

Run this challenge interactively in Python or JavaScript when the app loads.