{"problem":{"name":"A. Garden","description":{"content":"Luba thinks about watering her garden. The garden can be represented as a segment of length _k_. Luba has got _n_ buckets, the _i_\\-th bucket allows her to water some continuous subsegment of garden o","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF915A"},"statements":[{"statement_type":"Markdown","content":"Luba thinks about watering her garden. The garden can be represented as a segment of length _k_. Luba has got _n_ buckets, the _i_\\-th bucket allows her to water some continuous subsegment of garden of length **exactly** _a__i_ each hour. **Luba can't water any parts of the garden that were already watered, also she can't water the ground outside the garden**.\n\nLuba has to choose **one** of the buckets in order to water the garden as fast as possible (as mentioned above, each hour she will water some continuous subsegment of length _a__i_ if she chooses the _i_\\-th bucket). Help her to determine the minimum number of hours she has to spend watering the garden. It is guaranteed that Luba can always choose a bucket so it is possible water the garden.\n\nSee the examples for better understanding.\n\n## Input\n\nThe first line of input contains two integer numbers _n_ and _k_ (1 ≤ _n_, _k_ ≤ 100) — the number of buckets and the length of the garden, respectively.\n\nThe second line of input contains _n_ integer numbers _a__i_ (1 ≤ _a__i_ ≤ 100) — the length of the segment that can be watered by the _i_\\-th bucket in one hour.\n\nIt is guaranteed that there is at least one bucket such that it is possible to water the garden in integer number of hours using only this bucket.\n\n## Output\n\nPrint one integer number — the minimum number of hours required to water the garden.\n\n[samples]\n\n## Note\n\nIn the first test the best option is to choose the bucket that allows to water the segment of length 3. We can't choose the bucket that allows to water the segment of length 5 because then we can't water the whole garden.\n\nIn the second test we can choose only the bucket that allows us to water the segment of length 1.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Luba 正在考虑给她的花园浇水。花园可以表示为一个长度为 $k$ 的线段。Luba 有 $n$ 个水桶，第 $i$ 个水桶每小时可以浇灌花园中一个长度 *恰好* 为 $a_i$ 的连续子段。*Luba 不能浇灌已经浇过水的部分，也不能浇灌花园以外的区域*。\n\nLuba 必须 *选择其中一个* 水桶来尽可能快地浇灌整个花园（如上所述，如果她选择第 $i$ 个水桶，每小时她将浇灌一个长度为 $a_i$ 的连续子段）。请帮助她确定浇灌花园所需的最少小时数。保证 Luba 总可以选择一个水桶，使得用该水桶整数小时数浇灌整个花园是可行的。\n\n请参考示例以获得更清晰的理解。\n\n输入的第一行包含两个整数 $n$ 和 $k$（$1 ≤ n, k ≤ 100$）——水桶的数量和花园的长度。\n\n第二行包含 $n$ 个整数 $a_i$（$1 ≤ a_i ≤ 100$）——第 $i$ 个水桶每小时可以浇灌的线段长度。\n\n保证至少存在一个水桶，使得仅使用该水桶即可用整数小时数浇灌整个花园。\n\n请输出一个整数——浇灌花园所需的最少小时数。\n\n在第一个测试用例中，最佳选择是使用能浇灌长度为 $3$ 的线段的水桶。我们不能选择能浇灌长度为 $5$ 的线段的水桶，因为那样无法浇灌整个花园。\n\n在第二个测试用例中，我们只能选择能浇灌长度为 $1$ 的线段的水桶。\n\n## Input\n\n输入的第一行包含两个整数 $n$ 和 $k$（$1 ≤ n, k ≤ 100$）——水桶的数量和花园的长度。第二行包含 $n$ 个整数 $a_i$（$1 ≤ a_i ≤ 100$）——第 $i$ 个水桶每小时可以浇灌的线段长度。保证至少存在一个水桶，使得仅使用该水桶即可用整数小时数浇灌整个花园。\n\n## Output\n\n请输出一个整数——浇灌花园所需的最少小时数。\n\n[samples]\n\n## Note\n\n在第一个测试用例中，最佳选择是使用能浇灌长度为 $3$ 的线段的水桶。我们不能选择能浇灌长度为 $5$ 的线段的水桶，因为那样无法浇灌整个花园。在第二个测试用例中，我们只能选择能浇灌长度为 $1$ 的线段的水桶。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"Given:\n- A garden of length $ k $.\n- $ n $ buckets, where the $ i $-th bucket can water a continuous segment of exact length $ a_i $ per hour.\n- Constraints:\n  - Only one bucket may be chosen.\n  - Watered segments must be entirely within the garden.\n  - No overlapping or watering outside the garden.\n- Goal: Minimize the number of hours to water the entire garden.\n\nFormal problem:\n\nLet $ a_i \\in \\mathbb{Z}^+ $ for $ i = 1, 2, \\dots, n $, and $ k \\in \\mathbb{Z}^+ $.\n\nFind:\n$$\n\\min_{\\substack{1 \\leq i \\leq n \\\\ a_i \\mid k}} \\left( \\frac{k}{a_i} \\right)\n$$\n\nThat is, minimize $ \\frac{k}{a_i} $ over all buckets $ i $ such that $ a_i $ divides $ k $ (since non-integer hours are not allowed, and the entire garden must be covered exactly by integer-length non-overlapping segments of size $ a_i $).\n\n**Note**: The guarantee that \"it is possible to water the garden\" ensures that at least one $ a_i $ divides $ k $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF915A","tags":["implementation"],"sample_group":[["3 6\n2 3 5","2"],["6 7\n1 2 3 4 5 6","7"]],"created_at":"2026-03-03 11:00:39"}}