#C5597. Missing Marbles
Missing Marbles
Missing Marbles
You are given the original counts and current counts of marbles in four different colors: red, blue, green, and yellow. The original counts are denoted by \(R_1, B_1, G_1, Y_1\) and the current counts by \(R_2, B_2, G_2, Y_2\). Your task is to determine how many marbles of each color are missing. Mathematically, the missing marbles for each color can be computed as:
[ \text{missing}{color} = \text{original}{color} - \text{current}_{color} ]
For example, if the original counts are 5 7 8 6 and the current counts are 3 6 7 4, then the output should be 2 1 1 2 representing the missing marbles in red, blue, green, and yellow respectively.
inputFormat
The input consists of a single line containing eight space-separated integers:
- \(R_1\) \(B_1\) \(G_1\) \(Y_1\): the original counts of the red, blue, green, and yellow marbles.
- \(R_2\) \(B_2\) \(G_2\) \(Y_2\): the current counts of the red, blue, green, and yellow marbles.
You may assume that all numbers are non-negative integers.
outputFormat
Output a single line containing four space-separated integers. These integers represent the number of missing red, blue, green, and yellow marbles respectively. That is, each value is computed as the difference between the corresponding original count and current count.
## sample5 7 8 6 3 6 7 4
2 1 1 2