Files
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

21 lines
317 B
C++

#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;
}