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

Koodin suorituksen tulos näkyy tässä

Tests12
Visible tests
Piilotettu testi 7
Piilotettu testi 8
Piilotettu testi 9
Piilotettu testi 10
Piilotettu testi 11
Piilotettu testi 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