作业帮 > 英语 > 作业

英语翻译1353.The milliard Vasya's functionVasya is the beginning

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:英语作业 时间:2024/06/25 03:52:55
英语翻译
1353.The milliard Vasya's function
Vasya is the beginning mathematician.He decided to make an important contribution to the science and to become famous all over the world.But how can he do that if the most interesting facts such as Pythagor’s theorem are already proved?Correct!He is to think out something his own,original.So he thought out the Theory of Vasya’s Functions.Vasya’s Functions (VF) are rather simple:the value of the Nth VF in the point S is an amount of integers from 1 to N that have the sum of digits S.You seem to be great programmers,so Vasya gave you a task to find the milliard VF value (i.e.the VF with N=1000000000) because Vasya himself won’t cope with the task.Can you solve the problem?
Input
Integer S (1 ≤ S ≤ 81).
Output
The milliard VF value in the point S.
Sample
input
1
output
10
1410.Crack
Today Arthur has got not the best day of his life.Today is Thursday and in the morning he had to lie under a bulldozer,which was pulling down his house,and his planet is destroyed,and Marvin is a pain in the neck.And now Arthur is standing in front of Vl'hurgs' commander and he has to speak,otherwise in the space-time continuum a tiny crack will appear and so on...May be exactly Arthur will have this crack.For example,in the bones of his skull.So,he is to speak immediately and certainly in Vl'hurgish.There's only one problem:the only thing that Arthur has heard in Vl'hurgish is the demand to surrender that was proclaimed a second ago.The Hitchhiker's Guide to the Galaxy can only prompt to Arthur that the Vl'hurgish language is very complicated.There are millions of rules and some of them are very amusing.For instance,no sound in verbal Vl'hurgish may last more than one second.They don't like mumblers.It's known as well that Vl'hurgs don't like when replying to some remark you use any of the two-word combinations that were contained in the original remark.In this case they may think that you parody them and parodists are out of favor among Vl'hurgs.Also,these valiant warriors don't use the same word twice in one phrase.What should Arthur do?He wants to gain time.But he is to say something!Arthur has decided to repeat the phrase of Vl'hurgs' commander having thrown out just several words and not changing their order.What else can he do?Just gain time pronouncing each sound exactly one second.
But how much time can he gain this way?
Input
The input file contains a phrase of Vl'hurgs' commander.The words consist just of lower-case and capital Latin letters.Any other symbols are word separators.One letter denotes one sound.The length of any Vl'hurgish word is not greater than 100.The amount of words in one phrase doesn't exceed 100000.
Output
Output a single number:the maximal time in seconds that Arthur may speak.Of course,Arthur doesn't want to seem a mumbler or parodist.
请手动翻译!
请手动翻译!请手动翻译!请手动翻译!请手动翻译!请手动翻译!
请手动翻译!请手动翻译!请手动翻译!请手动翻译!请手动翻译!
请手动翻译!请手动翻译!请手动翻译!请手动翻译!请手动翻译!
请手动翻译!请手动翻译!请手动翻译!请手动翻译!
英语翻译1353.The milliard Vasya's functionVasya is the beginning
1353.第十亿个Vasya函数
Vasya是个初级数学家.他立志要对这一学科做出重大贡献从而闻名全球.但是最热门的理论诸如:毕氏定理早已经被证明了,他怎么做才能完成自己的理想呢?你猜对啦!他想拥有属于自己的理论,由他自己原创的.所以呢,他就想到了Vasya函数理论.(VF)这个理论非常简单:S点上的第N个VF值是一个整数,这个整数集是包括由1到N的所有S数的集合.Vasya本身不太会处理这个问题,但是你看起来是个很厉害的程序员,所以呢Vasya想把这个工作交给你,让你找出第十亿个的VF函数值.(例:VF+N=1000000000)你能帮他解决这个问题吗?
输入
整数S(1≤S≤81).
输出
在S点上的第十亿VF函数值.
举例
输入
1
输出
10
1410.裂变
对于亚瑟来说今天有点糟糕.今天是星期三,一大早他被迫躺在了推土机下,因为有人要推倒他的房子,他的星球就要毁灭了,同时他认为马文真是个讨人厌的家伙.现在亚瑟正站在VI“hurgs”指挥官面前,他必须得申诉,否则在他的时空里一个又一个裂变将会持续不断的发生...也许下一次就轮到他自己了.也许这个裂变就发生在他的头骨里.所以,他决定立刻果断的在VI'hurgish里做出反抗.现在唯一的问题是:亚瑟在VI'hurgish里收到的唯一的信息就是一秒钟前系统宣布的投降命令.能提供给亚瑟的唯一提示就是:VI'hurgish语言极其复杂,它有成百上千条的规则,其中一些还非常搞笑.比如说,口头的VI'Hurgish语言声音持续不会超过一秒,因为他们不喜欢说话含含糊糊的人.还有,当你在回复短语的时候,VI'hurgs不喜欢你使用那些原语句中已经包含的2个字母组合.如果你那么做的话,他们会认为你是一个拙劣的模仿者,而这样的模仿者在VI'hurgs里是绝对不会受到欢迎的.同样的,这些勇敢的战士也不会在一个短语里面重复用2遍同样的单词.这样的话,亚瑟该怎么做呢?他想争取一些时间.但是同时他也先得说点什么!亚瑟决定先重复那些VI'hurgs指挥官舍弃的一些单词,但是不改变这些单词的顺序.然后呢?他还能做些什么?尽量争取时间,在发每个音的时候做到只发绝对精确的一秒.但是光是这样的话他能争取到多少时间呢?
输入
输入文件包含VI'hurgs'指挥官的一个短语.单词输入仅包含小写和大写的拉丁字母.另一个标志是字分隔符.一个字母表示一声.任何VI'hurgish单词不能长于100.一个短语中的所有单词总量不能超过100000.
输出
输出一个单独的数字:每秒亚瑟能进行会话的上限时间.当然了,亚瑟可不愿意被看做是个拙劣的模仿者或者是个说话含含糊糊的人.
= =貌似那个计算机语句不用翻译的 LZ你就凑和着看吧~