AtCoder Beginner Contest 191
D
Circle Lattice Points
AtCoder
⌀ 1953
原题
← CE →
翻译中…

Problem Statement

翻译中…

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.

翻译中…

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.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

X Y R

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
0.2 0.8 1.1
Output #1
3
The circle is shown below. The grid points within or on the circle are marked red. ![Figure](https://img.atcoder.jp/ghi/4f37b99cfbdbb337043b16d8ce64571c.png)
Input #2
100 100 1
Output #2
5
$X$, $Y$, and $R$ may not have decimal points. Note that we also count the grid points on the circle.
Input #3
42782.4720 31949.0192 99999.99
Output #3
31415920098
题目信息
题号
abc191_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。