1 solutions

  • 0
    @ 2025-3-8 16:15:29
    #include<bits/stdc++.h>
    using namespace std;
    int a[114514];
    int main()
    {
    	int n,m;
    	cin>>n>>m;
    	for(int i=n;i<=m;i++){
    		int t=i;
    		int q=0;
    		while(t){
    			if((t%10)%2==0) q++;
    			t/=10;
    		}
    		if(q==4) a[i]=i;
    	}
    	bool st=0;
    	for(int i=n;i<=m;i++){
    		if(a[i]!=0){
    			if(st==0){
    				cout<<a[i];
    				st=1;
    			}
    			else cout<<","<<a[i];
    		}
    	}
    	return 0;
    }
    

    Information

    ID
    705
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    8
    Tags
    # Submissions
    17
    Accepted
    6
    Uploaded By