-->
当前位置:首页 > 题库

PROGRAMMING:Finding prime numbers

Luz5年前 (2021-05-10)题库414
Now I give you n numbers of 0 ~ 9 side by side in a column, and also give a length of L. It is stipulated that starting from the first digit, taking l consecutive digits from left to right, spelling a number of length L (except the L-1 digit with the highest bit of 0), and then taking l consecutive digits from left to right from the second digit... In this way, at most n-l + 1 l digits can be obtained. Now, please output the prime numbers of these l-digits in the order from small to large (if there are repetitions, you only need to output one).
###Input format:
The first line is n and l, separated by a space( 1<=N<=100,1<=L<=7)
The second line is n numbers from 0 to 9 separated by spaces.
###Output format:
Output only one line, including all prime numbers that meet the conditions, separated by commas
###Input example:
```in
10 3
8 9 1 0 2 3 5 4 7 6
```
###Output example:
```out
five hundred and forty-seven
```






answer:If there is no answer, please comment