Problem9710--ABC191 —— D - Circle Lattice Points

9710: ABC191 —— D - Circle Lattice Points

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

We have a circle of radius $R$ centered at $(X, Y)$.  
Find the number of grid points (points whose $x$- and $y$-coordinates are both integers) within or on the circle.

Input

Input is given from Standard Input in the following format:

```
$X$ $Y$ $R$
```

Output

Print the answer.

Constraints

-   $|X| \le 10^5$
-   $|Y| \le 10^5$
-   $0 \lt R \le 10^5$
-   Each of $X$, $Y$, and $R$ has at most four digits after the decimal point.

Sample 1 Input

0.2 0.8 1.1

Sample 1 Output

3

The circle is shown below. The grid points within or on the circle are marked red.

Sample 2 Input

100 100 1

Sample 2 Output

5
X, Y, and R may not have decimal points. Note that we also count the grid points on the circle.

Sample 3 Input

42782.4720 31949.0192 99999.99

Sample 3 Output

31415920098

Source/Category