GFSS Christmas Challenge P1 - Arithmetic Operators

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Peter the reindeer is preparing for the NPCO (North Pole Computing Olympiad) and comes over the following problem:

You are given two integers a and b. Output a+b, ab, and a×b on separate lines, respectively.

Peter believes he can output a+b successfully but requires help with the others. Could you help Peter solve his problem?

Input Specification

The first line contains a (1a103).

The second line contains b (1b103).

Output Specification

Output the value of a+b, ab, and a×b on three separate lines. For clarification, refer to the sample output below.

Sample Input 1

Copy
2
3

Sample Output 1

Copy
5
-1
6

Explanation

Each line of output represents one of (a+b,ab,a×b).

  • The first line is a+b=2+3=5.
  • The second line is ab=23=1.
  • The third line is a×b=2×3=6.

Comments

There are no comments at the moment.