#include <stdio.h>
int countZeros(int n) {
int count = 0;
while (n % 10 == 0) {
count++;
n /= 10;
}
return count;
}
int main(void) {
printf("%d\n", countZeros
(123000)); printf("%d\n", countZeros
(102030)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgY291bnRaZXJvcyhpbnQgbikgewogICAgaW50IGNvdW50ID0gMDsKICAgIHdoaWxlIChuICUgMTAgPT0gMCkgewogICAgICAgIGNvdW50Kys7CiAgICAgICAgbiAvPSAxMDsKICAgIH0KICAgIHJldHVybiBjb3VudDsKfQoKaW50IG1haW4odm9pZCkgewoJcHJpbnRmKCIlZFxuIiwgY291bnRaZXJvcygxMjMwMDApKTsKCXByaW50ZigiJWRcbiIsIGNvdW50WmVyb3MoMTAyMDMwKSk7CglyZXR1cm4gMDsKfQo=