#C10963. Score Adjustment Problem
Score Adjustment Problem
Score Adjustment Problem
You are given a list of scores and two integers \(X\) and \(Y\). Your task is to adjust the scores as follows: for every score \(s\) that is less than or equal to \(X\), update it to \(\min(s + Y, 10)\). Scores greater than \(X\) remain unchanged.
Example: If the scores are [1, 5, 7, 10, 3] with \(X = 5\) and \(Y = 3\), then the adjusted scores are [4, 8, 7, 10, 6].
Note that the adjustment ensures that no score exceeds 10.
inputFormat
The first line contains three integers \(n\), \(X\), and \(Y\), where \(n\) is the number of scores. The second line contains \(n\) space-separated integers denoting the scores.
For instance:
5 5 3 1 5 7 10 3
outputFormat
Output the adjusted scores in one line, separated by spaces.
For the sample above, the expected output is:
4 8 7 10 6## sample
5 5 3
1 5 7 10 3
4 8 7 10 6