Skip to content

Commit bca915d

Browse files
committed
Merge branch 'add-kaprekar-check' of https://github.com/Sean-Randall/Python into add-kaprekar-check
2 parents c33f100 + 322ed12 commit bca915d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

maths/special_numbers/kaprekar_number.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def is_kaprekar_number(n: int) -> bool:
2727
if n <= 0 or (n % 10 == 0 and n == 10 ** len(str(n))):
2828
return False # Disallow powers of 10 (e.g., 10, 100)
2929

30-
square = str(n ** 2)
30+
square = str(n**2)
3131
for i in range(1, len(square)):
3232
left, right = square[:i], square[i:]
3333
if n == int(left or "0") + int(right):

0 commit comments

Comments
 (0)