fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int t;
  5. while(t--)
  6. {
  7. int n1,n2,x,s,y=0,r;
  8. cin>>n1>>n2;
  9. cout<<n1<<n2;
  10.  
  11. for(int i=n1;i<=n2;i++)
  12. {
  13. s=i;
  14. r=0;
  15. x=0;
  16. r=0;
  17. cout<<i;
  18. while(s!=0)
  19. {
  20. r=s%10;
  21. x=x*10+r;
  22. s=s/10;
  23. cout<<r;
  24. }
  25. if(x==i)
  26. {
  27. y+=i;
  28. cout<<y;
  29. }
  30. }
  31. cout<<y<<endl;
  32. }
  33.  
  34. return 0;
  35. }
Success #stdin #stdout 0s 16064KB
stdin
1
1 2

stdout
Standard output is empty