SAC '22 Code Challenge 3 P1 - Hair Hazards
View as PDFWhen school finishes, Fayez decides to experiment with new hair lengths.
Currently, Fayez has a hair length of  cm.
Whenever he visits his barber in the summer, his hair will be cut  cm shorter.
He will visit his barber  times and wants to know his hair length after each haircut.
Can you help him?
Input Specification
The first line will contain  
, the length of Fayez's hair initially.
The next will contain  
, the length of hair trimmed off from each haircut.
The next line will contain  
, the number of haircuts Fayez will get.
Output Specification
Output the length of Fayez's hair after each haircut in cm.
Sample Input
200
2
3
Sample Output
198
196
194
Comments