Trim Ending Zeros

Trailing zeros can make a number harder to read when they do not add meaning, such as in a short code or batch number. Write a function no_boring_zeros that takes a non-negative integer n and removes all zeros from the end. If the input is 0, return 0.

Примеры

Ввод
1450
Вывод
145
Ввод
960000
Вывод
96
Ввод
1050
Вывод
105

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

def no_boring_zeros(n: int) -> int:

Теги

math
PostgreSQLv16

Tady se objeví výsledek běhu kódu

Visible tests
1
Input
1450
Expected145
2
Input
960000
Expected96
3
Input
1050
Expected105
4
Input
-1050
Expected-105
5
Input
0
Expected0
6
Input
-1
Expected-1
Focus radio
Paused · SomaFM · Fluid