#include #include int main(void){ int a, b; scanf("%d%d", &a, &b); while(a <= b){ if(a % 3 == 0){ printf("%d\n",a); } else { int temp; temp = a; while(temp > 0){ if(temp % 10 == 3){ printf("%d\n",a); goto NO; } else temp /= 10; } } NO: a++;} return 0; }