{"problem":{"name":"A. Book Reading","description":{"content":"Recently Luba bought a very interesting book. She knows that it will take _t_ seconds to read the book. Luba wants to finish reading as fast as she can. But she has some work to do in each of _n_ nex","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF884A"},"statements":[{"statement_type":"Markdown","content":"Recently Luba bought a very interesting book. She knows that it will take _t_ seconds to read the book. Luba wants to finish reading as fast as she can.\n\nBut she has some work to do in each of _n_ next days. The number of seconds that Luba has to spend working during _i_\\-th day is _a__i_. If some free time remains, she can spend it on reading.\n\nHelp Luba to determine the minimum number of day when she finishes reading.\n\n**It is guaranteed that the answer doesn't exceed _n_.**\n\n**Remember that there are 86400 seconds in a day.**\n\n## Input\n\nThe first line contains two integers _n_ and _t_ (1 ≤ _n_ ≤ 100, 1 ≤ _t_ ≤ 106) — the number of days and the time required to read the book.\n\nThe second line contains _n_ integers _a__i_ (0 ≤ _a__i_ ≤ 86400) — the time Luba has to spend on her work during _i_\\-th day.\n\n## Output\n\nPrint the minimum day Luba can finish reading the book.\n\n**It is guaranteed that answer doesn't exceed _n_**.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"最近，卢巴买了一本非常有趣的书。她知道阅读这本书需要 $t$ 秒。卢巴希望尽可能快地读完这本书。\n\n但在接下来的 $n$ 天中，她每天都有工作要做。在第 $i$ 天，卢巴需要花费 $a_i$ 秒用于工作。如果还有空闲时间，她可以用来阅读。\n\n请帮助卢巴确定她完成阅读的最早是第几天。\n\n*保证答案不超过 $n$。*\n\n*请注意，一天有 86400 秒。*\n\n第一行包含两个整数 $n$ 和 $t$（$1 ≤ n ≤ 100$，$1 ≤ t ≤ 10^6$）——天数和阅读书籍所需的时间。\n\n第二行包含 $n$ 个整数 $a_i$（$0 ≤ a_i ≤ 86400$）——卢巴在第 $i$ 天用于工作的时长。\n\n请输出卢巴完成阅读的最早一天。\n\n*保证答案不超过 $n$。*\n\n## Input\n\n第一行包含两个整数 $n$ 和 $t$（$1 ≤ n ≤ 100$，$1 ≤ t ≤ 10^6$）——天数和阅读书籍所需的时间。第二行包含 $n$ 个整数 $a_i$（$0 ≤ a_i ≤ 86400$）——卢巴在第 $i$ 天用于工作的时长。\n\n## Output\n\n请输出卢巴完成阅读的最早一天。*保证答案不超过 $n$。*\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**\nLet $C = 86400$ be a constant representing the total capacity of a unit.\nLet $n, t \\in \\mathbb{Z}$ be given such that:\n*   $1 \\le n \\le 100$\n*   $1 \\le t \\le 10^6$\n\nLet $A = (a_1, a_2, \\dots, a_n)$ be a sequence of integers where:\n*   $0 \\le a_i \\le C$ for all $1 \\le i \\le n$\n\n**Objective**\nFind the minimum integer $k \\in \\{1, \\dots, n\\}$ such that:\n\n$$ \\sum_{i=1}^{k} (C - a_i) \\ge t $$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF884A","tags":["implementation"],"sample_group":[["2 2\n86400 86398","2"],["2 86400\n0 86400","1"]],"created_at":"2026-03-03 11:00:39"}}