CR7syn @ 2022-11-28 23:18:25
#include<stdio.h>
#include<math.h>
int main()
{
int t,palindrome=0,i,a,b,y,n,g;
scanf("%d %d",&a,&b);
for(i=a;i<=b;i++)
{
palindrome = 0;
y = 2;
n = i % y;
while (n != 0)
{
y++;
n = i % y;
}
if (i == y)
{
n = i;
for (; n != 0; n /= 10)
{
t = n % 10;
palindrome = palindrome * 10 + t;
}
if (palindrome == i)
{
printf("%d", i);
printf("\n");
}
}
}
return 0;
}
by ZVitality @ 2022-11-29 08:29:26
时间复杂度炸了。(