#include #include using namespace std; template std::string tostr(const T& t) { std::ostringstream os; os<> A >> B; for(long long i = A;i<=B;i++){ string s = tostr(i); if(i%3==0){ cout << i << "\n"; }else if((int)s.find('3')!=-1){ cout << s << "\n"; } } return 0; }