3 solutions

  • 1
    @ 2026-8-14 13:50:47
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int t;
    	cin>>t;
    	for(int i=1;i<=t;i++)
    	{
    		int s=1;
    		int n;
    		cin>>n;
    		while(n)
    		{
                int ge=n%10;
    			s=s*ge;
    			n=n/10;
    		}
    		cout<<s<<endl;
    	}
    	return 0; 
    }
    

    Information

    ID
    2841
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    62
    Accepted
    40
    Uploaded By