Practice Count Lattice Points Inside a Circle
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Medium#2249
LeetCode ProblemCount Lattice Points Inside a Circle
Problem Statement
Each circles[i] = [x, y, r] describes a circle with center (x, y) and radius r. Count distinct points with integer coordinates that lie inside or on the boundary of at least one circle. Return the count; a point covered by several circles is counted once.
Source: Count Lattice Points Inside a Circle on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
circles = [[2,2,1]]
Output
5
# Example 2
Input
circles = [[2,2,2],[3,4,1]]
Output
16
Constraints
1 <= circles.length <= 200
circles[i].length == 3
1 <= xi, yi <= 100
1 <= ri <= min(xi, yi)
Related LeetCode Problems
Practice more problems similar to Count Lattice Points Inside a Circle.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.