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

PROGRAMMING:The product of the reciprocal n nodes of a linked list

Luz5年前 (2021-05-10)题库417
This problem requires computing the product of the reciprocal n nodes of a single linked list. For example, given the single chain table 12345, the product of the reciprocal two nodes is 20.
###Input format:
Input has two lines, the first line is two non negative integers m and n. Where m is the number of nodes in the list and N is the number of reciprocal nodes in the list. The calculation results are in the range of int.
The second line is the number of M linked lists, separated by spaces.
###Output format:
Output the product of reciprocal n nodes in a row.
###Input example:
```in
5 2
1 2 3 4 5
```
###Output example:
```out
twenty
```
###Example explanation:
20 = 4 * 5







answer:If there is no answer, please comment