/* -*- coding: utf-8 -*- * * 537.cc: No.537 ユーザーID - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef long long ll; typedef set sll; /* global variables */ sll used; /* subroutines */ inline ll cc(ll x, ll y) { ll t = 10; while (t <= y) t *= 10; return x * t + y; } /* main */ int main() { ll n; cin >> n; ll cnt = 0; for (ll x = 1; x * x <= n; x++) if (n % x == 0) { ll y = n / x; ll a = cc(x, y), b = cc(y, x); if (used.find(a) == used.end()) { cnt++; used.insert(a); } if (used.find(b) == used.end()) { cnt++; used.insert(b); } } printf("%lld\n", cnt); return 0; }