Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i, k = 0, N, x = 0, j;
- int a[100];
- cin >> N;
- for (i = 0; i < N; i++)
- {
- cin >> a[i];
- }
- for (i = 0; i < N - 4 ; i++)
- {
- for (j = i + 4; j < N; j++)
- {
- if ((a[i] * a[j]) % 29 == 0)
- {
- k = k + 1;
- }
- }
- }
- cout << k;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement