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, a - b, and a \times 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 (1 \le a \le 10^3).

The second line contains b (1 \le b \le 10^3).

Output Specification

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

Sample Input 1

2
3

Sample Output 1

5
-1
6

Explanation

Each line of output represents one of (a + b, a - b, a \times b).

  • The first line is a + b = 2 + 3 = 5.
  • The second line is a - b = 2 - 3 = -1.
  • The third line is a \times b = 2 \times 3 = 6.

Comments

There are no comments at the moment.