#include #include #include #include #include using namespace std; vector vec; long long all = 0; bool judge(string s){ for(int i=0;i> n; for(long long i=1;i<=sqrt(n);i++){ if(n%i == 0){ long long j = n/i; string s1 = to_string(i); string s2 = to_string(j); if( (s1+s2) == (s2+s1) ){ if(judge(s1+s2)){ vec.push_back(s1+s2); all++; } }else{ if(judge(s1+s2)){ vec.push_back(s1+s2); all++; } if(judge(s2+s1)){ vec.push_back(s2+s1); all++; } } } } cout << all << endl; return 0; }