Skip Teen Values

Sometimes values need to be filtered before a total is calculated, such as temporary discounts, errors, or special codes. Write a function no_teen_sum that takes three numbers a, b, and c and returns their sum, but treats numbers from 13 to 19 inclusive as 0. The exceptions are 15 and 16: add them as normal numbers.

Примеры

Ввод
1, 2, 3
Вывод
6
Ввод
2, 13, 1
Вывод
3
Ввод
2, 1, 14
Вывод
3

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

def no_teen_sum(a: int, b: int, c: int) -> int:

Теги

math
PostgreSQLv16

Her vises resultatet af din kode

Visible tests
1
Input
1, 2, 3
Expected6
2
Input
2, 13, 1
Expected3
3
Input
2, 1, 14
Expected3
4
Input
2, 1, 15
Expected18
5
Input
2, 1, 16
Expected19
6
Input
6, 17, 18
Expected6
Focus radio
Paused · SomaFM · Fluid