Skip to content

Commit c33f100

Browse files
committed
Remove redundant check for int(right) == 0 after excluding powers of 10
1 parent e523f99 commit c33f100

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

maths/special_numbers/kaprekar_number.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def is_kaprekar_number(n: int) -> bool:
3030
square = str(n ** 2)
3131
for i in range(1, len(square)):
3232
left, right = square[:i], square[i:]
33-
if int(right) == 0:
34-
continue
3533
if n == int(left or "0") + int(right):
3634
return True
3735
return False

0 commit comments

Comments
 (0)