Files
python/LuoGu/RuMen/P2666.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

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;
}