谁能帮我翻译一下~下面的一个问题

来源:百度知道 编辑:UC知道 时间:2024/05/27 19:50:19
Given is an alphabet {0, 1, ... , k}, 0 <= k <= 9 . We say that a word of length n over this alphabet is tight if any two neighbour digits in the word do not differ by more than 1. Input is a sequence of lines, each line contains two integer numbers k and n, 1 <= n <= 100. For each line of input, output the percentage of tight words of length n over the alphabet {0, 1, ... , k} with 5 fractional digits.

由于是一个字母( 0 , 1 , ... ,钾) , 0 < = k < = 9 。我们说一句话的长度n超过这个字母是紧张,如果任何两个邻国的数字,在Word中不不同而不同以上的1 。输入是一个序列线,每行包含两个整数K和N ,一<为N < = 100 。每一行输入,输出的百分比紧张的话,长度n超过字母表( 0 , 1 , ... ,钾) 5分数数字。