Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- #ifdef Niloy
- read("input.txt");
- write("output.txt");
- #endif
- int n;
- cin >> n;
- int arr[n];
- for (int i = 0; i < n; i++) {
- cin >> arr[i];
- }
- int count = 0, ans = 0;
- for (int i = 0; i < n - 1; i++) {
- for (int j = i; j < n; j++) {
- if(i != j && (arr[i] % arr[j] != 0)) {
- count++;
- }
- }
- ans = max(ans, count);
- count = 0;
- }
- cout << ans << endl;
- cerr << "time = " << (clock() / CLOCKS_PER_SEC) << " sec" << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement