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; 
    }
    
    • -1
      @ 2025-12-11 21:25:37

      #include<bits/stdc++.h>`#include<bits/stdc++.h> using namespace std; int main() { int n,m=1; cin>>n; for(int i=1;i<=n;i++){ int x; cin>>x; while(x){ int ge=x%10; m*=ge; x/=10; } cout<<m<<endl; m=1; } return 0; }

      • -1
        @ 2025-7-11 10:37:18
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        	int n,m=1;
        	cin>>n;
        	for(int i=1;i<=n;i++){
        		int x;
        		cin>>x;
        		while(x){
        		int ge=x%10;
        		m*=ge;
        		x/=10;
        		}
        		cout<<m<<endl;
        		m=1;
        	}
        	return 0;
        }
        
        
        
        • 1

        Information

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