#include #include #include #include #include using namespace std; typedef unsigned long long ull; int main() { ull n=0; cin >> n; ull rn = static_cast(sqrt(n)); unsigned int count=0; vector set(1,"0");//候補を記憶する配列 for (int i = 1;i <= rn;i++) { double ans = n / i; if (n%i!=0)continue;//制数でないならば、先頭に戻る string str1 = to_string(i); string str2 = to_string(static_cast(ans)); auto itr1 = find(set.begin(),set.end(),str1+str2); if (itr1 == set.end()) { string buff = str1 + str2; set.push_back(buff); count++; } auto itr2 = find(set.begin(),set.end(),str2+str1); if (itr2 == set.end()) { string buff = str2 + str1; set.push_back(buff); count++; } } cout << count; return 0; }