Double on Match

Sometimes a calculation rule changes when the input values match, which is a great way to practice if. Write a function sum_double that takes two integers a and b. Return their normal sum, but if the numbers are equal, return double that sum.

Примеры

Ввод
1, 2
Вывод
3
Ввод
3, 2
Вывод
5
Ввод
2, 2
Вывод
8

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

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

Теги

math
PostgreSQLv16

Qui apparirà il risultato dell'esecuzione del codice

Visible tests
1
Input
1, 2
Expected3
2
Input
3, 2
Expected5
3
Input
2, 2
Expected8
4
Input
-1, 0
Expected-1
5
Input
5, 5
Expected20
6
Input
1000, 10
Expected1010
Focus radio
Paused · SomaFM · Fluid