← back to unit
Medium
# searching medium
None of the Above?
The bakery's unlucky number is k — no tray count divisible by k may leave the kitchen! 🧁
You get a list of tray counts and the number k. Print all clear if NONE of the counts is divisible by k, otherwise bad tray.
Example:
Input: counts = [7, 11, 13], k = 3
Output: all clear
None of 7, 11, or 13 divides evenly by 3, so the search never finds a bad tray.
Input: counts = [7, 9, 13], k = 3
Output: bad tray
9 divides evenly by 3, so the search finds a bad tray.
💡 need a hint?
srch-none-divisible.py🔒 given lines are locked — write your code in between
loading...