Multiply Two Numbers

Multiplication is one of the basic operations behind almost every calculation in a program. Write multiply, which takes two numbers a and b and returns their product. The numbers may be positive, negative, or 0.

Примеры

Ввод
2, 3
Вывод
6
Ввод
5, 0
Вывод
0
Ввод
-4, 3
Вывод
-12

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

def multiply(a: int, b: int) -> int:

Теги

math
PostgreSQLv16

Siia ilmub koodi käivituse tulemus

Visible tests
1
Input
2, 3
Expected6
2
Input
5, 0
Expected0
3
Input
-4, 3
Expected-12
4
Input
7, 7
Expected49
5
Input
100, 2
Expected200
6
Input
2, 1000
Expected2000
Focus radio
Paused · SomaFM · Fluid