Flip the Sign

The opposite of a number is the same distance from zero, but on the other side of the number line. Write opposite, which takes number and returns it with the sign flipped. A positive number becomes negative, a negative number becomes positive, and 0 stays 0.

Примеры

Ввод
1
Вывод
-1
Ввод
-5
Вывод
5
Ввод
0
Вывод
0

Нужно реализовать

def opposite(number: int) -> int:

Теги

math
PostgreSQLv16
Entre para enviar

O resultado da execução do código aparecerá aqui

Visible tests
1
Input
1
Expected-1
2
Input
-5
Expected5
3
Input
0
Expected0
4
Input
14
Expected-14
5
Input
-9
Expected9
6
Input
1000
Expected-1000
Focus radio
Paused · SomaFM · Fluid