Unique Value Sum
Sometimes a total should include only the values that appear once. Write a function lone_sum that takes three numbers a, b, and c. Return the sum of only the numbers that do not match any other value; repeated values should not be included.
Примеры
Ввод
1, 2, 3Вывод
6Ввод
3, 2, 3Вывод
2Ввод
3, 3, 3Вывод
0Нужно реализовать
def lone_sum(a: int, b: int, c: int) -> int:
Теги
math
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj sięVisible tests
1
Input
1, 2, 3Expected
62
Input
3, 2, 3Expected
23
Input
3, 3, 3Expected
04
Input
9, 2, 2Expected
95
Input
2, 2, 9Expected
96
Input
1, 1, 1Expected
0Focus radio
Paused · SomaFM · Fluid