#C6038. Track ID Finder
Track ID Finder
Track ID Finder
In this problem, you are given three integers (n), (k), and (x) where:
- \(n\) represents the initial number of tracks.
- \(k\) represents the number of update hours.
- \(x\) (1-indexed) indicates the position of a track in the collection.
Every hour, each track's ID is increased by (1). Therefore, after (k) hours, the track originally at position (x) will have its ID increased by (k). Your task is to compute the updated track ID at position (x). That is, the answer is given by the formula:
[ \text{ID} = x + k ]
Example: If (n = 5), (k = 2), and (x = 1), the track ID at position 1 becomes (1 + 2 = 3).
inputFormat
The input is read from standard input (stdin) and consists of a single line containing three space-separated integers: (n) (k) (x).
outputFormat
Output the updated track ID (an integer) to the standard output (stdout).## sample
5 2 1
3