永发信息网

计算机 编程 C语言

答案:2  悬赏:70  手机版
解决时间 2021-04-20 21:23
计算机 软件 C语言题 悬赏分:5 - 离问题结束还有 14 天 23 小时 The jackpot ________________________________________ As Manuel wants to get rich fast and without too much work, he decided to make a career in gambling. Initially, he plans to study the gains and losses of players, so that, he can identify patterns of consecutive wins and elaborate a win-win strategy. But Manuel, as smart as he thinks he is, does not know how to program computers. So he hired you to write programs that will assist him in elaborating his strategy. Your first task is to write a program that identifies the maximum possible gain out of a sequence of bets. A bet is an amount of money and is either winning (and this is recorded as a positive value), or losing (and this is recorded as a negative value). Input The input set consists of a positive number N <= 10000 , that gives the length of the sequence, followed by N integers. Each bet is an integer greater than 0 and less than 1000. The input is terminated with N = 0. Output For each given input set, the output will echo a line with the corresponding solution. If the sequence shows no possibility to win money, then the output is the message "Losing streak." Sample Input: 5 12 -4 -10 4 9 3 -2 -1 -2 0 Sample Output: The maximum winning streak is 13. Losing streak.
最佳答案
我可以帮你写出这段程序
全部回答

这是你要的译文:

至于曼努埃尔想快速致富,没有太多的工作,他决定在赌博生涯。 Initially, he plans to study the gains and losses of players, so that, he can identify patterns of consecutive wins and elaborate a win-win strategy.最初,他计划研究的成果和球员的损失,因此,他可以找出连胜模式和拟订一项双赢战略。 But Manuel, as smart as he thinks he is, does not know how to program computers.但曼努埃尔,一样聪明,他认为他是,不知道如何程序的计算机。 So he hired you to write programs that will assist him in elaborating his strategy.因此,他雇用了你写的程序,将协助他制定他的战略。 Your first task is to write a program that identifies the maximum possible gain out of a sequence of bets.您的第一个任务是编写一个程序,确定出的最高的投注顺序可能获得的利润。 A bet is an amount of money and is either winning (and this is recorded as a positive value), or losing (and this is recorded as a negative value).阿投注是金钱,是可以赢得(这是一项积极的货值录),或失去(这是为负值记录)。 Input The input set consists of a positive number N <= 10000 , that gives the length of the sequence, followed by N integers.输入输入设置包括一个积极的数目N“= 10000,使该序列的长度,然后由N整数。 Each bet is an integer greater than 0 and less than 1000.每个投注是大于0的整数,小于1000。 The input is terminated with N = 0.输入终止与N = 0。 Output For each given input set, the output will echo a line with the corresponding solution.对于每一个给定的输出输入设置,输出将回声与相应的解决方案路线。 If the sequence shows no possibility to win money, then the output is the message "Losing streak."如果序列显示没有可能赢得的钱,那么输出的消息“连败。” Sample Input: 5 12 -4 -10 4 9 3 -2 -1 -2 0 Sample Output: The maximum winning streak is 13.示例输入:5 12 -4 -10 4 9 3 -2 -1 -2 0示例输出:最高连胜纪录是13。 Losing streak.连败。

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
依恋木门在哪里啊,我有事要去这个地方
怎么我很久没近家园,头像就变黑了呢?
非警校毕业的大专生可以去公安局或派出所吗?
柳州银行24小时自助银行(三江支行)地址在哪,
关于诛仙宠物问题
表示湖面平静的句子,形容门前湖面一年四季烟
库铁工人文化宫地址有知道的么?有点事想过去
周迅和赵薇谁更红?
找一首日文歌曲
头发油,脱发怎么办
多少岁开始用精华,女人什么年龄用精华液,精
西王我想知道这个在什么地方
谁关于兄弟的日记
安装samba服务器问题
描写不舍分别的诗词,形容不舍的古诗词
推荐资讯
钦州市建晟建设工程有限公司在什么地方啊,我
代数式的问题
猜猜我有多爱仿编诗歌,形容一转眼孩子长大的
冲而用之或不盈.挫其锐.解其纷.和其光.同其尘
我手机不是智能机,能安装软件么?
求助谁是QQ高手!我的QQ一登陆,就跳出提示框
周杰伦出新歌了么?
松树、铁树、榕树的特点?
怎么才能把自己的所在的地址用Q号发给别人啊
七年级初中生生活3课答案
灵寿县公安局在什么地方啊,我要过去处理事情
请问:过年时车票会不会涨价
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?