#include <stdio.h>
int num_has_dig(int number, const int digit) {
if (number == 0 && digit == 0)
return 1;
int d;
while (number) {
d = number % 10;
if (d == digit)
return 1;
number = number / 10;
}
return 0;
}
int main(void) {
int i;
for (i = 0; i <= 1000; ++i) {
if (num_has_dig(i, 3))
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbnVtX2hhc19kaWcoaW50IG51bWJlciwgY29uc3QgaW50IGRpZ2l0KSB7CglpZiAobnVtYmVyID09IDAgJiYgZGlnaXQgPT0gMCkKCQlyZXR1cm4gMTsKCglpbnQgZDsKCXdoaWxlIChudW1iZXIpIHsKCQlkID0gbnVtYmVyICUgMTA7CgkJaWYgKGQgPT0gZGlnaXQpCgkJCXJldHVybiAxOwoJCW51bWJlciA9IG51bWJlciAvIDEwOwoJfQoJcmV0dXJuIDA7Cn0KCmludCBtYWluKHZvaWQpIHsKCWludCBpOwoJZm9yIChpID0gMDsgaSA8PSAxMDAwOyArK2kpIHsKCQlpZiAobnVtX2hhc19kaWcoaSwgMykpCgkJCXByaW50ZigiJWRcbiIsIGkpOwoJfQoJcmV0dXJuIDA7Cn0=