237 auto s = set<long long>();
239 for(
int i = 0; i < n2.length(); i++) {
241 for(
int j = 0; j < n2.length(); j++) {
242 bool bit = n2[j] !=
'0';
247 val +=
static_cast<long long>(pow(2, n2.size() - j - 1));
253 for(
int n = 1; n <= 2; n++) {
254 for(
int i = 0; i < n3.length(); i++) {
256 for(
int j = 0; j < n3.length(); j++) {
262 val +=
static_cast<long long>(v * pow(3, n3.size() - j - 1));
264 if(s.contains(val)) {