MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / check_numpoints

Function check_numpoints

codes/python/Code_5_05_2.py:1–7  ·  view source on GitHub ↗
(N, X, Y, lx, rx, ly, ry)

Source from the content-addressed store, hash-verified

1def check_numpoints(N, X, Y, lx, rx, ly, ry):
2 cnt = 0
3 for i in range(N):
4 # 点 (X[i], Y[i]) が長方形に含まれているかどうかを判定する
5 if lx <= X[i] and X[i] <= rx and ly <= Y[i] and Y[i] <= ry:
6 cnt += 1
7 return cnt
8
9# 入力
10N, K = map(int, input().split())

Callers 1

Code_5_05_2.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected