火星美元AI (CI翻译)
One day Vasya got hold of information on the Martian dollar course in bourles for the next $*n*$ days. The buying prices and the selling prices for one dollar on day $*i*$ are the same and are equal to $*a*_{*i*}$. Vasya has $*b*$ bourles. He can buy a certain number of dollars and then sell it no more than once in $*n*$ days. According to Martian laws, one can buy only an integer number of dollars. Which maximal sum of money in bourles can Vasya get by the end of day $*n*$?
$*n*$ 天内火星美元兑布勒的汇率信息。第 $*i*$ 天,一美元的买入价和卖出价相同,均为 $*a*_{*i*}$。Vasya 有 $*b*$ 布勒。他可以购买一定数量的美元,然后在这 $*n*$ 天内最多卖出一次。根据火星法律,只能购买整数数量的美元。Vasya 到第 $*n*$ 天结束时最多可以拥有多少布勒?AI (CI翻译)Input
输入格式
AI (CI翻译)The first line contains two integers $*n*$ and $*b*$ ($1 ≤ *n*, *b* ≤ 2000$) — the number of days and the initial number of money in bourles. The next line contains $*n*$ integers $*a*_{*i*}$ ($1 ≤ *a*_{*i*} ≤ 2000$) — the prices of Martian dollars.
第一行包含两个整数 $*n*$ 和 $*b*$($1 ≤ *n*, *b* ≤ 2000$)——天数和初始布勒数量。下一行包含 $*n*$ 个整数 $*a*_{*i*}$($1 ≤ *a*_{*i*} ≤ 2000$)——火星美元的价格。AI (CI翻译)
Output
输出格式
AI (CI翻译)Print the single number — which maximal sum of money in bourles can Vasya get by the end of day $*n*$.
输出一个整数——Vasya 到第 $*n*$ 天结束时最多可以拥有的布勒数量。
AI (CI翻译)
样例
2 4
3 7
8
4 10
4 3 2 1
10
4 10
4 2 3 1
15
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。