发布时间: 2016年12月3日 16:34 最后更新: 2016年12月3日 16:34 时间限制: 1000ms 内存限制: 65536M
Input to the program is a list of words and numbers, one per line starting in column one, followed by a line containing a single asterisk in column one. A number will consist only of decimal digits (0 through 9) followed immediately by the end of line (that is, there will be no commas in input numbers). A word will consist of between one and twenty lowercase alphabetic characters (a through z).
The output is to contain a single line for each word or number in the input data. This line is to contain the word starting in column one, followed by an appropriate number of blanks, and the corresponding word number starting in column 23. Word numbers that have more than three digits must be separated by commas at thousands, millions, and so forth.
29697684282993 transcendental 28011622636823854456520 computationally zzzzzzzzzzzzzzzzzzzz *
elementary 29,697,684,282,993 transcendental 51,346,529,199,396,181,750 prestidigitation 28,011,622,636,823,854,456,520 computationally 232,049,592,627,851,629,097 zzzzzzzzzzzzzzzzzzzz 20,725,274,851,017,785,518,433,805,270