REVNUMBE - Reverse And Add
Bacchi is always into books. She was bored with her monotonous life. One day she thought how would it look if everything was upside down and as she was a book worm, she thought how numbers will look if they were reversed.
For this task she wants your help.
You will be given two numbers a and b (0<=a, b<=10^15), you have to perform the following operations on them:
- reverse both the numbers and add them.
- reverse the result that you get after operation 1.
- print the result.
Input
First line contains the number of test cases 'T' (T<=100), then 'T' lines follow. Each line consists of two numbers separated by a space.
Output
Output will be in the format "Case i#: result" where i is the ith test case and result is the final output.
Example
Input: 2
1234 5678
1002 123 Output: Case 1#: 68031
Case 2#: 2232
Added by: | Rajesh Kumar |
Date: | 2012-09-02 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | ASM32-GCC MAWK BC C-CLANG C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JAVA JS-MONKEY JULIA KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET |