2 solutions

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

    • 0
      @ 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
      34
      Accepted
      17
      Uploaded By