#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> A >> B; FOR(i, A, B+1){ string s = to_string(i); bool is_ok = false; ll sum = 0; for(char c : s){ if(c=='3'){ is_ok = true; } sum += ctoi(c); } if(sum%3==0){ is_ok = true; } if(is_ok){ p(i); } } return 0; }