Computer Science, asked by moghenamrata251, 1 year ago

The S-score of an array of integers is calculated as follows:

For each integer in the array, the S-score is 2 if the last digit or the second-last digit of the integer is 7, or 3 if both the last and second-last digits are 7, and 0 if none of those digits are 7.
Here second-last digit means the digit in the tens place.
The S-score is never more than 3
For example: 107 scores 2, 172 scores 2, 32177 scores 3, and 17322 scores 0.
The total S-score of an array is simply the sum of the S-scores of all the integers in the array
For example: the array {107, 172, 32177, 17322} will score 2+2+3+0 = 7.
If an integer does not have a second-last digit, it is assumed to be 0.

Answers

Answered by ifrajamal
0
itana bara question or sirf 5point
Similar questions