Four Operations

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 5938
64-bit integer IO format: %I64d      Java class name: Main

Description

Little Ruins is a studious boy, recently he learned the four operations!

Now he want to use four operations to generate a number, he takes a string which only contains digits '1' - '9', and split it into $5$ intervals and add the four operations '+', '-', '*' and '/' in order, then calculate the result(/ used as integer division).

Now please help him to get the largest result.

Input

First line contains an integer $T$, which indicates the number of test cases.

Every test contains one line with a string only contains digits '1'-'9'.

Limits
$1 \leq T \leq 10^5$
$5 \leq \text{length of string} \leq 20$

Output

For every test case, you should output 'Case #x: y', where x indicates the case number and counts from 1 and y is the result.

Sample Input

1
12345

Sample Output

Case #1: 1

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .