49,425
社区成员




#include <iostream>
#include <string>
using namespace std;
bool checkA(long long x)
{
string s = to_string(x);
int l = 0, r = s.size() - 1;
while(l <= r)
{
if(s[l] != s[r])
{
return false;
}
l ++;
r --;
}
return true;
}
bool checkB(long long x)
{
int i = 1;
while(true)
{
if(i * (i + 1) == x * 2)
{
return true;
}
if(i * (i + 1) > x * 2)
{
return false;
}
i ++;
}
}
int main()
{
long long n = 20220515;
while(true)
{
if(checkA(n) && checkB(n))
{
cout << n << endl;
return 0;
}
n ++;
}
return 0;
}
#include <iostream>
using namespace std;
long long l = 2333333, r = 23333333;
bool check(int x)
{
int ans = 0;
for(int i = 2; i <= x / i; i++)
{
if(x % i == 0)
{
while(x % i == 0)
{
x /= i;
ans ++;
}
}
}
if(x > 1) ans ++;
if(ans == 12) return true;
else return false;
}
int main()
{
int ans = 0;
for(int i = l; i <= r; i++)
{
if(check(i))
{
ans ++;
}
}
cout << ans << endl;
return 0;
}