The Cat
Искусственный Интеллект
(116118)
8 лет назад
Держите:
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n, x, y, count;
double r;
cin >> n;
r = sqrt(n);
count = 0;
for (x = 0; x < r; x++)
for (y = 0; y < r; y++)
if (x * x + y * y < n) count++;
cout << count << endl;
return 0;
}