COCI 2008/2009, Contest #6

Quite often there is substantial noise in the classroom during class. Instead of paying attention to what the teacher is saying, the students rather discuss the economic crisis or Croatia's joining the European Union.
The biggest noise often occurs when the students are idle, so teachers will give them tasks with a lot of work to calm them down. In one type of such task, the student must calculate the result of an arithmetic operation on two large numbers.
The arithmetic operations we will consider are adding and multiplication. The operands will be powers of 10 with no more than 100 digits.
Write a program that calculates the result of the operation.

Input

The first line contains a positive integer A, the first operand.
The second line either the character '+' or '*', representing addition or multiplication.
The third line contains a positive integer B, the second operant.
The integers A and B will be powers of 10 and consist of at most 100 digits.

Output

Output the result of the operation.

```1000
*
100
```

`100000`

```10000
+
10
```

`10010`

```10
+
1000
```

`1010`

```1
*
1000
```

Output

`1000`

Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M
Added: Mar 09, 2009

Languages Allowed:
C++03, PAS, C, ASM, C#, C++11

• (0/0)
will we need to add the same numbers, i.e, 10+10?

• (0/0)
The problem doesn't say you won't be asked to.

• (2/0)
Why can't I submit this in Java?

• (0/0)
Java is not allowed for problems where big numbers are required, since Java has a built-in BigInteger class.

• (0/0)

• (0/0)
There's no reason you shouldn't be able to debug this, seeing as you program does wildly incorrect things, such as outputting numbers with leading zeros or outputting 2 numbers for 1 case...

• (0/0)
There's something wrong with your adding. That's all I'm going to say.