16 solutions
-
1
#include <iostream> #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; int main() { int hws,b,sum=0; cin>>hws; for(int a=hws;a>0;a/=10) { b=a%10;//一次是个,2次十位,等等 sum=sum*10+b; } if(sum==hws) { cout<<"yes"; } else cout<<"no"; return 0; } yujie好厉害
Information
- ID
- 32
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 6
- Tags
- # Submissions
- 5411
- Accepted
- 1716
- Uploaded By