Skip to content

Commit a237d93

Browse files
authored
Update count-numbers-with-unique-digits.py
1 parent ac9d1ad commit a237d93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/count-numbers-with-unique-digits.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def countNumbersWithUniqueDigits(self, n):
1010
if n == 0:
1111
return 1
1212
result = cnt = 1
13-
for k in xrange(n-1):
14-
cnt *= 9-k
13+
for i in xrange(n-1):
14+
cnt *= 9-i
1515
result += cnt
1616
return 1+9*result
1717

0 commit comments

Comments
 (0)