Multiply Two Numbers

Write a function multiply that takes two numbers a and b and returns their product. The numbers can be positive, negative, or equal to 0. The * operator will help with multiplication.

Примеры

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

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

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

Теги

math
PostgreSQLv16

Qui apparirà il risultato dell'esecuzione del codice

Tests12
Visible tests
Test nascosto 7
Test nascosto 8
Test nascosto 9
Test nascosto 10
Test nascosto 11
Test nascosto 12

They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.

Focus radio
Paused · SomaFM · Fluid