+ 1

how to simplify the code?

is it possible to simplify this code? if so, how? a sequence of positive integers is passed. All numbers do not exceed 1000, their number is known, but can be very large. Then the control value is transmitted - the largest number R that satisfies the following conditions: 1) R - the product of two different transmitted elements of the sequence ("different" means that the squares of the transmitted numbers are not considered, the products of different but equal in magnitude elements are allowed); 2) R is not divisible by 10. As a result of transmission interference, both the numbers themselves and the control value may be distorted. Write a program that will check the correctness of the control value. The program should print a report in the following form: Received numbers: ... Accepted reference value: ... The calculated control value: ... Control passed (or Control failed) If a control value satisfying the condition cannot be dete https://code.sololearn.com/czYBh67a8w4A/?ref=app

5th May 2020, 11:00 AM
shiryaeva
shiryaeva - avatar
1 Antwort
+ 1
What exactly is your code meant to do? The better we understand your purpose, the easier we can help.
5th May 2020, 11:11 AM
HonFu
HonFu - avatar