| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10042 | Lab01 |
|
| 10728 | A simple set problem |
|
Description
A number consists of two digits. The sum of the digit in units and the digit in tens is A. If the two digits are interchanged, the new number is B greater than the original number. Find the original number.
Input
Given two positive intergers A and B.
Output
Please output the original number.
Sample Input Download
Sample Output Download
Tags
Discuss
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.