PRJAN15A  An Arithmetic Problem
A sequence is an arithmatic sequence if every two succesive number has same difference. Suppose this is a sequence of numbers:
a_{1}, a_{2}, a_{3},....................a_{n}
This is an arithmatic sequence if a_{i}a_{i+1}_{ }is same for each i from 1 to n1.
You are given first 3 terms of a sequence and the value of n. If it is an arithmatic sequence you must print the nth term. Otherwise you must print “Error”.
Input Format:
In First line there will an integer T denoting number of test cases. Each of the next 3 lines will contain 4 integers a_{1}, a_{2}, a_{3 }and n.
Output Format:
In each line specify the case number and print the answer.
Constraints:
300<=a_{1}, a_{2}, a_{3}<=300
1<=n<=1000
Sample Input:
3
1 2 3 10
1 4 3 10
15 30 45 5
Sample Output:
Case 1: 10
Case 2: Error
Case 3: 75
Problemsetter: Shafaet Ashraf
hide comments
Mitch Schwartz:
20150131 05:04:48
Moved to tutorial, it is very simple.


Sachin Verma:
20150131 05:04:48
:P


Namit Agrawal:
20150131 05:04:48
it must be a tutorial question..!! 

vishrut mishra:
20150131 05:04:48
it should be tutorial 

Vamsi Krishna Avula:
20150131 05:04:48
tutorial problem(?) 
Added by:  Shafaet 
Date:  20150129 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 JSMONKEY 
Resource:  Progrkriya Contest January 2015 