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