
NSV
By: a guest on
Apr 28th, 2012 | syntax:
C++ | size: 0.36 KB | hits: 23 | expires: Never
#include <iostream>
#include <cmath>
using namespace std;
typedef long long LL;
int main()
{
LL r; cin >> r;
LL cnt = 0;
for (LL x = 0; x < r; ++x)
{
double y = sqrt(double(r * r - x * x));
LL Y = y;
if (y > Y)
++Y;
cnt += Y;
}
cnt *= 4;
cout << cnt << endl;
return 0;
}