#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include using namespace std; typedef long long int ll; #define REP(i,n) for(ll i=0; i<=n; ++i ) #define REPR(i,n) for( ll i=n; i>=0; --i) #define FOR(i,a,n) for(ll i=a; i<=n; ++i ) #define FORR(i,a,n) for(ll i=n; i>=a; --i) #define VDOUT(x) cerr << #x << "\n";for(auto i : x ) cerr << " " << i << "\n"; #define DOUT(x) cerr << #x << " = " << x << "\n"; #define COUT(x) cout << x << "\n"; #define COUT2(x,y) cout <> n; set res; FOR(i, 1, sqrt(n)) { if (n%i == 0) { ll tmp = n / i; string a = to_string(i); string b = to_string(tmp); res.insert(a + b); res.insert(b + a); } } COUT(res.size()); return 0; }