Problems
10048 - Undetected Error
SUBMIT PROBLEM

Undetected Error

Time Limit: 1.5 sec

 

The Problem

After a test of a code, Mina detect X errors and Rina discovered Y errors in the same code. There are Z errors in common. 

If the total error are A, estimate the number of errors that are still undetected.

 

The Input

The first line contains a positive integer T ( 1<=T<=100000), denoting the number of test cases. The next T lines will contain 4 integers X, Y, Z, and A.

 

The Output

For each test case, output one line in the format "Case m: n" (quotes for clarity), where m is the case number and n is the number of errors that are still undetected by Mina and Rina.

 

Sample Input 

2

2 3 1 6

5 3 2 10

 

Sample Output

Case 1: 2

Case 2: 4

 

 

 

Online Practice Contest 2 [School & College Level]

Problem Setter: Shahin ShamS