class Ideone {
static int countZeros(int n) {
int count = 0;
while (n % 10 == 0) {
count++;
n /= 10;
}
return count;
}
public static void main
(String[] args
) { System.
out.
println(countZeros
(123000)); System.
out.
println(countZeros
(102030)); }
}
Y2xhc3MgSWRlb25lIHsKCXN0YXRpYyBpbnQgY291bnRaZXJvcyhpbnQgbikgewoJICAgIGludCBjb3VudCA9IDA7CgkgICAgd2hpbGUgKG4gJSAxMCA9PSAwKSB7CgkgICAgICAgIGNvdW50Kys7CgkgICAgICAgIG4gLz0gMTA7CgkgICAgfQoJICAgIHJldHVybiBjb3VudDsKCX0KCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgkJU3lzdGVtLm91dC5wcmludGxuKGNvdW50WmVyb3MoMTIzMDAwKSk7CgkJU3lzdGVtLm91dC5wcmludGxuKGNvdW50WmVyb3MoMTAyMDMwKSk7Cgl9Cn0=