0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 22:36:25 +00:00
OI-codes/Luogu/problem/P2666/P2666.cpp
2021-01-02 15:30:52 +08:00

22 lines
471 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = 0;
cin >> n;
for (int i = 0; i <= 100; i++) {
for (int j = 0; j <= 100; j++) {
for (int k = 0; k <= 100; k++) {
for (int p = 0; p <= 100; p++) {
if (i * i + j * j + k * k + p * p == n) {
ans++;
}
}
}
}
}
cout << ans << endl;
return 0;
}