Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a[11][11];
- int main()
- {
- int i,j,n,m,k,p=1,nr=0;
- cin>>k>>n>>m;
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=m;j++)
- {
- cin>>a[i][j];
- if(a[i][j]==k)
- {
- a[0][j]++;
- }
- }
- }
- for(j=1;j<=m;j++)
- {
- if(a[0][j]!=0)
- {
- p=p*j;
- nr++;
- }
- }
- if(nr!=0)
- {
- cout<<p;
- }
- else
- {
- cout<<"NU EXISTA";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement