5 solutions

  • 1
    @ 2022-3-8 21:23:24
    #include <stdio.h>
    #include <algorithm>
    #include <math.h>
    #include <vector>
    using namespace std;
    int main() {
        for(int i=10;i<100;i++)
        {
            int s=i/10,g=i%10;
            printf("%d%d%d\n",i,g,s);
        }
        return 0;
    }
    
    
  • 0
    @ 2024-10-28 17:10:52

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

    • 0
      @ 2024-9-22 16:24:58

      #include<stdio.h> int main() {

      for (int i=1000;i<=9999;i++)
      {
      	if(i/1000 == i%10 && (i/100)%10 == (i%100)/10)
      	printf("%d\n" , i); 
      }
      return 0;
      

      }

      • 0
        @ 2022-11-4 18:53:41

        image

        • 0
          @ 2022-2-28 8:40:57
          #include<bits/stdc++.h>
          using namespace std;
          int main(){
          	for(int i=1000;i<=9999;i++){
          		int a,b,c,d;
          		a=i%10;
          		b=i/10%10;
          		c=i/100%10;
          		d=i/1000%10;
          		if(a==d&&b==c){
          			cout<<i<<endl;
          		}
          	}
          	return 0;
          }
          • 1

          Information

          ID
          32
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          4
          Tags
          # Submissions
          388
          Accepted
          172
          Uploaded By