0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 06:18:48 +00:00

P2666 [USACO07OCT]Bessie's Secret Pasture S

R42120490
This commit is contained in:
Baoshuo Ren 2020-11-18 18:50:21 +08:00 committed by Baoshuo Ren
parent 486abc676e
commit a3664210b2
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
problem/P2666/P2666.cpp Normal file
View File

@ -0,0 +1,21 @@
#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;
}