#include <stdio.h> void w(int a) { int n=3; int sum=0; int t=a; while(n>=0){ sum=sum*10+t%10; t=t/10; n--; } if(a==sum){ printf("%d\n",sum); } } int main() { int m; for(m=1000;m<=9999;m++){ w(m); } return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account