One day, found a password consisting of numbers from
~
. She wants to know how conspicuous this password is to
.
has a visual threshold of
, and only the number whose length is not less than
can be noticed by him.
We define as the number of occurrences of the number
in the password
.
Then we define the conspicuousness of a password
:
Noticed: means number
is a subnumber of the password
. For example,
is true and
is not.
Since does not know the visual threshold
, please help calculate the conspicuousness
under the
kinds of situations.
The first line contains two positive integersand
, indicating the length of the password and the number of situations;
The second line contains a number with a length of, which represents the password discovered by
;
In the nextline, each line has a positive integer
, which represents the visual threshold of
.
The output should containlines, each representing the conspicuousness
in different situations.