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