Rating Simulation
Medium · rating 1250 · Simulation
A player starts at rating start; each win adds k and each loss subtracts k, but the rating never drops below 0. The first line has start and k. The second line is a string of W/L results. Print the final rating.
Constraints: 0 ≤ start ≤ 106, 1 ≤ k ≤ 104
Related problems
- Boustrophedon Seat — Medium
- Tournament Champion — Medium
- Health Bar — Easy
- Snake Length — Easy
- Traffic Light — Easy