Home > Back-end > Delphi - algorithm, the optimal score urgent, online, etc.
Delphi - algorithm, the optimal score urgent, online, etc.
Time:09-21
I novice, is working on a software, is a scoring algorithm is stuck, hope everybody can help me to solve, Data samples:
Requirements: according to the number of rope skipping find out corresponding points in the table above, In a grade, for example: 2 ~ 4 times to 10 points, 5 ~ 7 times - 20 points, 8 ~ 10 times 30 points and so on,
CodePudding user response:
Establish a rating table, field: grade, number, scoring, ID A grade 1 0 A grade 2 10 3 a grade 10 4 a grade 10 . First grade 120, 100, . Second grade 1 0 .
In this way, by grade, number, corresponding to the table, would have been found to score,
CodePudding user response:
The actual number of filter the data set is greater than the number in the table, arranged in reverse chronological order, take the first,