硬件的花费的计算的算法问题,怎么实现对数字代码位的计算运用的是C语言的程序办法?

Problem Description
Ola Clason’s Hardware store is an old company where most work is done “the old way”. Among other things, the company is the one and only provider of marble house numbers. These house numbers have become extremely popular among construction companies, especially the ones building luxury estates. This is of course great for Ola Clason, but also a small problem. Nisse, who has been managing the incoming orders has turned out to be a bottleneck in Ola’s business. Most orders are on the form “Coconut Drive 200, 202, 204, ..., 220”. This means every even number between 200 and 220. Nisse’s work is to transfer an order to a list of necessary digits and other symbols.

Your assignment is to write a program that automates Nisse’s work with orders containing only positive integer house numbers. Nisse will still in the future process all special orders (those including non digit symbols) by hand.

Input
On the first line of input is a single positive integer n, specifying the number of orders that follow. The first line of each order contains the road name for that order. No road name is longer than 50 characters. The second line states the total number of buildings needing new marble numbers on that order. Then follows the different house number specifications on several lines. These lines are of two kinds: single number lines and multiple number lines. A single number line simply consists of the house number by itself, while a multiple number line starts with a “+”-sign, followed by three positive integer numbers: first number, last number and the interval between the house numbers. The distance between the first and last house number will always be a multiple of the house number interval. A house number will never have more than five digits. After the last house number specification line, the next order follows, if there is any.

Output
For each order, the output consists of 13 lines. The first and second lines should be identical with the first two input lines. Then, there follows 10 lines with information on how many marble digits of each kind the order consists of. These rows are on the format “Make X digit Y” where X is how many copies of digit Y they need to make. The last row states the total number Z of digits needed, on the format “In total Z digits”. If there is only one digit to produce, it should say “In total 1 digit”, in order to be grammatically correct.

Sample Input
1
Short Street
23 addresses

  • 101 125 2 275
  • 100 900 100

Sample Output
Short Street
23 addresses
Make 23 digit 0
Make 22 digit 1
Make 5 digit 2
Make 4 digit 3
Make 1 digit 4
Make 5 digit 5
Make 1 digit 6
Make 4 digit 7
Make 1 digit 8
Make 3 digit 9
In total 69 digits

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问

相似问题

0
欧拉的数字问题的算法怎么利用C语言的程序的编写设计的思想来实现代码的
1
π_4-DQPSK调制解调算法matlab仿真及FPGA硬件实现?
0
分数多层嵌套的公式的计算的算法问题,怎么利用C语言编程的技术来编写代码实现的
0
超大数字的精确的计算的问题,如何运用C语言的程序的设计的形式实现这个算法
0
道路节点的最小花费的一个算法问题,怎么采用C语言的程序的代码实现的?
0
利用C语言的程序编写算法,计算最小的节点的编码的数字的问题怎么实现的?
0
图上的边的直径的计算的算法问题,怎么利用C语言的程序的代码的计算的方式?
0
计算机的花费的一个算法递推的公式,怎么采用C语言代码程序的编写技术的过程实现?
0
蜗牛的爬行的路程的时间的计算算法,怎么采用C程序的语言的代码的编写的过程来实现的
0
数列阵的一个算法的计算的实现问题,具体利用C语言编程技术的过程实现的系统的代码?
0
密码加强计算的一个算法的实现的原理,利用C语言的程序编写的代码的过程实现
0
十进制的数字对应的罗马数字字母的计算,怎么使用C程序语言代码高效实现的算法?
0
利用数组原理计算覆盖率的问题的算法,怎么使用C语言的程序的代码的编写的思路实现的?
0
对战问题损耗的计算算法,输入矩阵的计算怎么采用C语言的代码的编写的机制去实现这个算法?
0
区块的计算的算法问题的一个解答,怎么采用C程序的语言代码编写的过程?
1
输入一个日期的数字,计算是星期几的一个算法问题,怎么采用的C程序的语言的代码的编写的方式加以实现的?
0
通过算法估算计算机的价格问题,怎么采用C语言的程序代码编写的方式去实现的?
0
计算时间间隔的一个算法的求解问题,怎么利用C语言的程序代码编写的方式实现这个程序的计算的?
0
布尔型矩阵的一个计算算法的实现问题,怎么采用C语言的程序编写的代码去完成?
0
时钟指针的模拟的时间计算问题,怎么运用C语言代码表达程序算法的实现的方式?