ACM一道题关于字母对应数字的情况数的DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:"Let's just use a very simple code:We'll assign `A' the code word 1,`B' will

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 12:24:50
ACM一道题关于字母对应数字的情况数的DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:

ACM一道题关于字母对应数字的情况数的DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:"Let's just use a very simple code:We'll assign `A' the code word 1,`B' will
ACM一道题关于字母对应数字的情况数的
Description
Alice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:"Let's just use a very simple code:We'll assign `A' the code word 1,`B' will be 2,and so on down to `Z' being assigned 26." Bob:"That's a stupid code,Alice.Suppose I send you the word `BEAN' encoded as 25114.You could decode that in many different ways!" Alice:"Sure you could,but what words would you get?Other than `BEAN',you'd get `BEAAD',`YAAD',`YAN',`YKD' and `BEKD'.I think you would be able to figure out the correct decoding.And why would you send me the word `BEAN' anyway?" Bob:"OK,maybe that's a bad example,but I bet you that if you got a string of length 500 there would be tons of different decodings and with that many you would find at least two different ones that would make sense." Alice:"How many different decodings?" Bob:"Jillions!" For some reason,Alice is still unconvinced by Bob's argument,so she requires a program that will determine how many decodings there can be for a given string using her code.
Input
Input will consist of multiple input sets.Each set will consist of a single line of digits representing a valid encryption (for example,no line will begin with a 0).There will be no spaces between the digits.An input line of `0' will terminate the input and should not be processed
Output
For each input Sample Input
Copy to clipboard
25114
1111111111
3333333333
0
Sample Output
6
89
1
能否提供更多的测试用例给我?
更多的测试用例,

ACM一道题关于字母对应数字的情况数的DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:"Let's just use a very simple code:We'll assign `A' the code word 1,`B' will
222222222->55
22222222->34
2222222->21
222222->13
22222->8
2222->5
222->3
22->2
123123123123->81
12312312312->54
1231231231->27
123123123->27
12312312->18
1231231->9
123123->9
12312->6
1231->3
123->3
12->2

ACM一道题关于字母对应数字的情况数的DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice:Let's just use a very simple code:We'll assign `A' the code word 1,`B' will 一道关于计数制的题目(急)计算机中常用的十六进制是16进1的计数制,采用数字0-9和字母A-F共16个计数符号,这些符号与十进制数的对应关系如下表:十六进制 0 1 2 3 4 5 6 7 8 9 A B C D E F十进制 关于汽车的档位.对应的数字和字母是什么意思啊.求详解 B25-42-7-ACM是什么意思?是什么密封圈的规格?其中各个字母和数字是什么含义? ACM的一道题,但是数字大了,过不了!.2的64次方应该用什么类型保存! 关于十六进制的问题,例如,用十六进制表示:E+D=1B,则A×B=?数字0~9和字母A~F共16个记数符号这些符号与十进制的数的对应关系为计算机常用的十六进制的对应关系.说出答案后请解释一下,谢 默认情况下,excel工作表的行以什么为标记?A、数字+字母 B、字母+数字 C、数字 D、字母 一道acm的排序题Snow_storm有n(0 一道进位制的题目计算机常用的十六制是逢十六进一,采用数字0~9和字母A~F共16个计算符号,这些符号与十进制的数对应关系如下表:例如:用十六进制表示E+D=1B,则A×B=_____. 衣服的数字码都对应什么字母码数 键盘每个字母对应的数字是多什么?急`````` 笔记本键盘字母对应的数字一打就是数字不是字母怎么办? ACM关于实现字母与数组对应的问题C++Problem Description先来了解一下规则:ABCDEFGHIJKLMNOPQ*RSTUVW*XYZ这是字母表,字母在第i行第j列,则其对应整数ij,例如:A在第1行第1列,则A对应整数11,R在第3行第5列, acm的一道c语言问题 GBK内码中字母对应的数字我想知道GBK内码中各个字母所对应的数字是多少 例如字母A对应...要能填涂在志愿卡上 问一道acm的题,提交时老实说超时.Descriptionzyf最喜欢的数字是1!所以他经常会使用一些手段,把一些非1的数字变 成1,并为此得意不已.他会且仅会的两种手段是:1.把某个数m除以某个质数p——当 一道有关近似数和有效数字的题关于近似数2.3万精确到哪一位?有几个有效数字? 一道高数关于敛散性的题~