1 solutions

  • 0
    @ 2025-12-3 16:27:16

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a,n,c[11]; 
    int main()
    {
    	cin>>a>>n;
    	for(int i=1,j=a;i<=n;i++,j+=2)
    	{
    		int w=j;
    		while(w)
    		{
    			c[w%10]++;
    			w/=10;
    		}
    	}
    	for(int i=0;i<10;i++)
    		cout<<c[i]<<" ";
        return 0;
    }
    
    • 1

    Information

    ID
    884
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    2
    Accepted
    1
    Uploaded By