I
I
iam_dreamcode2019-04-04 22:02:18
Algorithms
iam_dreamcode, 2019-04-04 22:02:18

Algorithm for finding 5 unknowns?

We change the rating system on the site (the product can be rated from 1 to 5) From the input data, only the sum of the ratings and their number. Task: Approximately select a coefficient for each assessment. That is, for example, we have the sum of ratings 23 and the number of ratings 6. The algorithm must find a coefficient for rating 5 equal to 4 ratings, for rating 2 find 1 rating and one rating in 1. Help with finding a solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Fedoryan, 2019-04-05
@iam_dreamcode

Bust on the forehead

[ 1, 1, 1, 1, 1, 1 ]
...
[ 5, 5, 5, 5, 2, 1 ]

On the contrary, you can take the maximum estimates [ 5, 5, 5, 5, 5, 5 ]and reduce the last element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question