| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10728 | A simple set problem |
|
| 12354 | Mess everything up |
|
Description
Out of the N NTHU 2015 Computer Science (CS) majors, X of them take the course CS13550* Introduction to Programming (I), Y of them take the course CL10100* College Chinese, and Z of them take none of the two courses (i.e., CS13550* and CL10100*). How many NTHU 2015 CS majors take both of the two courses? And how many take CS13550* but not CL10100*?
Input
Four integers N, X, Y, Z which are separated by blanks. Note that 0<N<1000, 0<X<1000, 0<Y<1000 and 0<Z<1000.
Output
Two integers separated by a blank. The first integer is the number of NTHU 2015 CS majors who take both CS13550* and CL10100*, and the second one is the number of NTHU 2015 CS majors who take CS13550* but not CL10100*. Note that you do not need to print '\n' at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Mr. Broken fell in love in Japan but it was impossible to be with her after she went back to America.
Therefore, Mr. Broken wants to separate all couples and mess everything up.
There's a 4-digit number consisting of 1~9 except 0.
Mr. Broken will separate the first two digits from the last two digits, and then multiply them together.
Can you compute the result after Mr. Broken mess everything up?
For example, if the number is 6784, the first and last two digits are 67 and 84, then the answer is 67*84=5628.
Input
A 4-digit number consisting of 1-9 except 0
Output
The multiplication of the first two digits and the last two digits, and there is a '\n' at the end.