Description
Input
Output
Sample Input
12321 1234
Sample Output
YES NO
上代码:
#include<stdio.h>
void fun(long num)
{
long r = 0, temp = num;
while (num)
{
r = r * 10 + num % 10;
num = num / 10;
}
if (r == temp)
printf("YES");
else
printf("NO");
}
int main()
{
long num;
while (scanf_s("%ld", &num) != EOF) {
fun(num);
printf("\n");
}
return 0;
}