ε…₯εŠ›δΎ‹ 1 ABC 410 Completed

Problem 6 of 50

Easy

lightbulb What to do

You have a number of horse races, and each race allows horses of a certain age or younger to compete. You need to find out how many races a horse of a specific age can enter.

Key Concepts
lists loops conditional statements input/output
Examples

Input: [3, 1, 4, 1, 5], 4

Output: 2

Input: [1], 100

Output: 0

code Python Editor
Loading Python...
Test Results
tips_and_updates Tips for Beginners
  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first