5 solutions

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

    Information

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