After the Party
InterviewTime limit1sMemory limit128 MB
Compute actual attendees as L times P, then output the difference between each of five reported counts and that value.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
After a party ends, people wonder who came and how many people attended. When a party is very large, however, it is hard to count the exact number of attendees.
Sanggeun held a large party last Saturday to celebrate moving up to third grade. He knows how many people there were per square meter at the party venue.
The party was large enough that several newspapers reported on it. Sanggeun checked the attendee counts written in five different newspapers.
Assuming Sanggeun's calculated attendee count is correct, determine how far each newspaper's reported count is from the actual count.
Input
The first line contains L (1 <= L <= 10), the number of people per square meter, and P (1 <= P <= 1000), the area of the party venue.
The second line contains five attendee counts reported by the newspapers. Each count is an integer less than 10^6.
Output
Print five integers separated by spaces on one line. Each integer is the newspaper's reported attendee count minus Sanggeun's calculated actual attendee count.