Rounded Total
In receipts, reports, and quick estimates, rounded tens can be easier to work with than exact numbers. Write a function round_sum that takes three numbers a, b, and c, rounds each one to the nearest multiple of 10, and returns the sum of the rounded values. If a number ends in 5 or more, round it up; otherwise, round it down.
Примеры
Ввод
16, 17, 18Вывод
60Ввод
12, 13, 14Вывод
30Ввод
6, 4, 4Вывод
10Нужно реализовать
def round_sum(a: int, b: int, c: int) -> int:
Теги
math
Melde dich an, um den Einreichungsverlauf zu sehen
AnmeldenMelde dich an, um den KI-Mentor zu nutzen
AnmeldenVisible tests
1
Input
16, 17, 18Expected
602
Input
12, 13, 14Expected
303
Input
6, 4, 4Expected
104
Input
0, 0, 0Expected
05
Input
10, 20, 30Expected
606
Input
45, 21, 30Expected
100Focus radio
Paused · SomaFM · Fluid