parent
99fefd0fdb
commit
8effa3e2f5
Binary file not shown.
@ -1,21 +1,11 @@
|
|||||||
#include <bits/stdc++.h>
|
#include <bits/stdc++.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
int a[1010];
|
|
||||||
int main() {
|
int main() {
|
||||||
int n;
|
for (int a = INT_MIN; a <= INT_MAX; a++) {
|
||||||
int cnt = 0;
|
if (a * 2 / 2 != a)
|
||||||
cin >> n;
|
cout << a << endl;
|
||||||
for (int i = 1; i <= n; i++) {
|
|
||||||
cin >> a[i];
|
|
||||||
}
|
}
|
||||||
for (int i = 1; i <= n; i++) {
|
|
||||||
for (int j = i + 1; j <= n; j++) {
|
|
||||||
int x;
|
|
||||||
x = a[i] + a[j];
|
|
||||||
if (sqrt(x) * sqrt(x) == x)
|
|
||||||
cnt += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cout << cnt;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in new issue