Tom and Sangu played a game. First, the Tom gives Sangu a sequence of different numbers N a1, a2,., aN (not really set) and the number K. Sangu should build all the sequences of the series in length...


Tom and Sangu played a game. First, the Tom gives Sangu a sequence of different numbers N a1,<br>a2,., aN (not really set) and the number K. Sangu should build all the sequences of the series in<br>length K. In each row, he should write down the product of the numbers K – 2: all the features of the<br>following except the smallest and finest element.<br>Sangu wins the game if he can write down all these numbers and tellI Tom their product (module 10°<br>+ 7, as it can be very large). However, Sangu is a lazy child and wants to help him win the game.<br>Count the number Sangu has to tell Tom in python language.<br>Input<br>1<br>43<br>123 4<br>Output<br>36<br>

Extracted text: Tom and Sangu played a game. First, the Tom gives Sangu a sequence of different numbers N a1, a2,., aN (not really set) and the number K. Sangu should build all the sequences of the series in length K. In each row, he should write down the product of the numbers K – 2: all the features of the following except the smallest and finest element. Sangu wins the game if he can write down all these numbers and tellI Tom their product (module 10° + 7, as it can be very large). However, Sangu is a lazy child and wants to help him win the game. Count the number Sangu has to tell Tom in python language. Input 1 43 123 4 Output 36

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here