中易网

翻译一道编程的英文题目

答案:3  悬赏:20  
解决时间 2021-02-01 22:19
A Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k=1,N, and for each denomination Dk the machine has a supply of nk bills. For example,

N=3, n1=10, D1=100, n2=4, D2=50, n3=5, D3=10

means the machine has a supply of 10 bills of @100 each, 4 bills of @50 each, and 5 bills of @10 each.

Call cash the requested amount of cash the machine should deliver and write a program that computes the maximum amount of cash less than or equal to cash that can be effectively delivered according to the available bill supply of the machine.

Notes:
@ is the symbol of the currency delivered by the machine. For instance, @ may stand for dollar, euro, pound etc.

补充....
三楼的再麻烦一下..
一定加分数.. 谢谢!!
Input
The program input is from standard input. Each data set in the input stands for a particular transaction and has the format:
cash N n1 D1 n2 D2 ... nN DN
where 0 <= cash <= 100000 is the amount of cash requested, 0 <=N <= 10 is the number of bill denominations and 0 <= nk <= 1000 is the number of available bills for the Dk denomination, 1 <= Dk <= 1000, k=1,N. White spaces can occur freely between the numbers in the input. The input data are correct.
Hint
The first data set designates a transaction where the amount of cash requested is @735. The machine contains 3 bill denominations: 4 bills of @125, 6 bills of @5, and 3 bills of @350. The machine can deliver the exact amount of requested cash.
最佳答案
一家银行计划安装一台取款机,这种机器可以根据用户要求吐出适当金额的@现金,它用N种确定面额的钞票,而且Dk面额的有nk张,例如:
N=3,n1=10,D1=100, n2=4, D2=50, n3=5, D3=10

意思是这台机器有10张100@,4张50@,和5张10块@.

为了可以根据要求支付现款,取款机应该有一个程序来计算出最大金额,这个金额应该小于等于取款机根据上面数据可以提供的金额.

注解:
@是取款机可以提供的货币形式,比如,@可以代表美员,欧元,英镑等.
全部回答
银行计划安装一台机器为现金提款。机器是能够提供适当的@法案所要求的现金数额。
去雅虎那边翻译一下,很好用哦(*^__^*)
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
函数f(x)的图象与函数y=ln(x-1)(x>2)
紫金县临江地税局在什么地方啊,我要过去处理
徐州市侯集中学属于哪个区,哪条街道
宝庆宾馆在什么地方啊,我要过去处理事情
哪位大神知道,2012款福克斯三厢1.6尊贵版,2
少女时代童话人员唱歌顺序
鸭子和鹅吃哪一种饲料
焊缝符号 中 8为 焊角高度,45° 为 坡口角度
他这人老喜欢搞噱头! 噱头日语怎么说啊?
美的日用家电(确山)专卖店怎么去啊,有知道地
sql server习题在一个名为student的表中指定s
西安的华润万家招商部在那 我想联租做十字绣
杭州满陇桂雨公园停车场这个地址在什么地方,
常熟市电动平车厂在哪里啊,我有事要去这个地
三层交换机同时具备哪两个优点?交换机连成环
推荐资讯
my birthday ismay 4th(用june 2nd改为选择疑
离婚后孩子判给女方男方一次性支付抚养费男方
北京301医院放射科技师,合同工待遇如何?打
新疆阿凡提大串在什么地方啊,我要过去处理事
HALO4 斯巴达行动的剧情讲了什么??
太长高速公路/X359(路口)在哪里啊,我有事要
广州机电行业协会在什么地方啊,我要过去处理
国色天香大酒店地址在哪,我要去那里办事
利家福陶瓷地址在哪,我要去那里办事
姐妹羊汤馆这个地址在什么地方,我要处理点事
如家快捷酒店京广路店停车场在哪里啊,我有事
X923/Y010(路口)怎么去啊,有知道地址的么
手机登qq时,显示手机磁盘不足,清理后重新登
刺客的套装怎么选啊?