Submit | All submissions | Best solutions | Back to list |
ALPHMATH - Alphabet Arithmetic |
In his Introduction to Digital Arts and Sciences class, Dave frequently assigns homework. It usually consists of tedious exercises involving integer arithmetic. The students respond like true students: by complaining. So, to make the homeworks more exciting for his students, Dave has decided to disguise the exercises as alphabet arithmetic! This is exactly the same as integer arithmetic, except that instead of the usual digits 0 through 9, it uses letters A through J as the digits.
Help Dave generate the key to the homework!
Input
Each test case will be on one line of the form "NUMBER OP NUMBER". Each NUMBER is positive and less than 100000. OP is one of +, -, *, /. You will not have to divide by zero.
Output
For each test case, output the alphabet arithmetic answer on a single line.
Example
Input: G * H D - F B + B H / C Output: EC -C C D
Added by: | Miorel Palii |
Date: | 2009-10-16 |
Time limit: | 1s |
Source limit: | 4096B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 C++ 4.3.2 ERL NODEJS OBJC PERL6 SQLITE VB.NET |
Resource: | University of Florida Team Practice 2009 |
hide comments
2013-04-29 13:37:06 Anish Mashankar
how many test cases should be there? |
|
2011-04-06 01:38:58 Luis Camilo
When does the code has to end? How many test cases would there be? |