COCI '08 Contest 6 #1 Buka

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 32M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 Specification

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 Specification

Output the result of the operation.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2


Sample Input 3


Sample Output 3


Sample Input 4


Sample Output 4