You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
//回文数
|
|
bool Palindrome(int n) {
|
|
int m = n;
|
|
int s = 0;
|
|
while (m > 0) {
|
|
s = s * 10 + m % 10;
|
|
m /= 10;
|
|
}
|
|
return s == n;
|
|
}
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
cout << Palindrome(n) << endl;
|
|
return 0;
|
|
} |