23 lines
523 B
C++
23 lines
523 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int x, d = 0;
|
|
|
|
int main() {
|
|
double o;
|
|
cin >> x;
|
|
for (int i = 0; i <= 100; i++) {
|
|
for (int j = 0; j <= 100; j++) {
|
|
for (int k = 0; k <= 100; k++) {
|
|
o = x - i * i - j * j - k * k;
|
|
if (o >= 0) {
|
|
o = sqrt(o);
|
|
if (abs((o - int(o))) == 0) {
|
|
d++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
cout << d;
|
|
} |