Problems
10078 - Silly Sum
SUBMIT PROBLEM

Silly Sum

Time Limit: 0.5 sec

 

The Problem

In this problem you have to write a program to obtain sum(S) of first and last digit of an integer (N).

 

 

 

The Input

The first line of Input file contains an integer T (1<=T<=1000) denotes the total number of test cases. Then the follow T lines, where each line contains an integer N (-231<N<231).

 

The Output

For each test case, output one line in the format “Case X: S”, where X is the case number and S is the sum of first and last digit of N.

 

Sample Input

2

59247

97

 

Sample Output

Case 1: 12

Case 2: 16

 

 

 

Inter University Programming Contest - 2016 [BGC Trust University Bangladesh]

Problem Setter:  Md. Helal Uddin