Skip to content

Commit 78d7ac4

Browse files
Merge pull request Jack-Lee-Hiter#5 from wangershi/patch-1
Update 二维数组查找.py
2 parents f57eb34 + 9f0a15e commit 78d7ac4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Target Offer/二维数组查找.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def Find(self, array, target):
2929
# 判断非法输入
3030
# 可以换成 isinstance(target, (int, float)) 进行判断
3131
if type(target) == float and type(array[0][0]) == int:
32+
if int(target) == target:
33+
return False
3234
target = int(target)
3335
elif type(target) == int and type(array[0][0]) == float:
3436
target = float(int)

0 commit comments

Comments
 (0)