Arithmetic operations

It’s possible to do mathematical operations with variables in Python. We have already seen that it’s possible to add them with + and multiply them with *. The full list of possible operations is:

Operation

Description

With variables

Example with numbers

+

Addition

a + b

10 + 717

-

Subtraction

a - b

10 - 73

*

Multiplication

a * b

10 * 770

/

Division

a / b

10 / 71.4285714285714286

//

Floor division

a // b

10 // 71

%

Modulus (remainder after division)

a % b

10 % 73

**

Exponent

a**b

10**710000000

Challenge

Write a program that would input a number x and print x - 1, x, and x + 1 in the output.

Input

Output

10

9 10 11

0

-1 0 1

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue