Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- long long int n,x,i,j, counter=0;
- cin>>n>>x;
- long long int arr[n][n];
- for(i=0; i<n;i++)
- {
- for(j=0;j<n;j++)
- {//To fill the array with multiplication values.
- arr[i][j]=(i+1)*(j+1);
- // cout<<arr[i][j];
- }
- }
- for(i=0; i<n;i++)
- {
- for(j=0;j<n;j++)
- {
- if(arr[i][j]==x)
- {
- counter++;
- }
- }
- }
- cout<<counter;
- }
Add Comment
Please, Sign In to add comment