All problems

When Do We Hit the Target?

mediumPythonTime SeriesLoops

Meridian's grinder fund has a target written on the wall, and the owner wants to know which day of the run got there — the first day the pot reached the target, not the day it comfortably cleared it. Landing exactly on the target counts as reaching it. Every run in the ledger does reach it somewhere, so there is always an answer.

Task: Print the day the pot first reached the target.

Input

The first line holds the target, a number. The second line holds an integer n, the number of days. Each of the next n lines holds one day's takings.

Output

One line: the word day, one space, then the day's number counting from 1. Exactly one line, even though the pot stays at or above the target for every day that follows.

Example:

Input:
10
3
3
4
5

Output:
day 3

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…