#include #include int main(void){ int under, upper, i, j; char str[11]; memset(str,0,sizeof(str)); scanf("%d%d",&under, &upper); for(i=under; i<=upper; i++){ if(i%3 == 0){ printf("%d\n",i); }else { snprintf(str, 10, "%d", i); for(j=0; str[j] != '\0'; j++){ if(str[j] == '3'){ printf("%d\n", i); break; } } } } return 0; }