fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. long long t;
  5. scanf ("%lld", &t);
  6. while (t--)
  7. {
  8. long long n, m, s=0;
  9. scanf ("%lld", &n);
  10. m=n;
  11. while (m>0)
  12. {
  13. s=s*10+m%10;
  14. m=m/10;
  15. }
  16. if (n==s) printf ("YES\n");
  17. else printf ("NO\n");
  18. }
  19. }
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
Standard output is empty