C++ only Sam and Sangu played a game. First, the Sam 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...


C++ only<br>Sam and Sangu played a game. First, the Sam 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 tell Sam 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 Sam!<br>Input<br>1<br>43<br>1234<br>Output<br>36<br>

Extracted text: C++ only Sam and Sangu played a game. First, the Sam 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 tell Sam 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 Sam! Input 1 43 1234 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