#K41572. Remaining Fruits
Remaining Fruits
Remaining Fruits
In this problem, you are given the initial counts of three types of fruits: apples, bananas, and cherries. Additionally, you are given the counts of each fruit that has been eaten.
Your task is to calculate the remaining number of each fruit after consumption. Formally, if \( A \), \( B \), and \( C \) represent the initial numbers of apples, bananas, and cherries respectively, and \( a \), \( b \), and \( c \) are the numbers eaten, then the remaining fruits are computed as follows:
\[ \text{remaining apples} = A - a, \quad \text{remaining bananas} = B - b, \quad \text{remaining cherries} = C - c \]
All inputs are integers, and it is guaranteed that you will not have negative counts in the output.
inputFormat
The input consists of a single line containing six space-separated integers:
- initial_apples: Initial number of apples
- initial_bananas: Initial number of bananas
- initial_cherries: Initial number of cherries
- eaten_apples: Number of apples eaten
- eaten_bananas: Number of bananas eaten
- eaten_cherries: Number of cherries eaten
These values are provided via standard input (stdin).
outputFormat
Output a single line with three space-separated integers representing the remaining number of apples, bananas, and cherries, respectively, printed to standard output (stdout).
## sample5 8 10 1 3 4
4 5 6