#P1676. 「CMOI R0」Parallel Universe Shifter / Lattices in Circle
「CMOI R0」Parallel Universe Shifter / Lattices in Circle
Background
The original "[USACO05FEB] Aggressive Cows G" can be found at P1824.
$$\text{Answer}=\pi n^2+\mathrm O(n^{\frac{517}{824}}).$$$\small\color{white}/35^{\text{th}}\text{Problem by AtC}.$
Problem Description
Find the number of integer lattice points whose distance to the origin is at most .
Input Format
One line with one positive integer .
Output Format
One line with one positive integer, the answer. Note that it may be greater than .
1
5
2
13
5
81
19
1129
100
31417
30000
2827432965
10000000
314159265350589
500000000
785398163397389961
16000000000
804247719318986163169
700000000000
1539380400258998682200449
Hint
Explanation for Sample
The points that satisfy the condition are .
Constraints
Translated by ChatGPT 5