We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01eba46 commit 9c9d890Copy full SHA for 9c9d890
Python/find-the-k-th-character-in-string-game-i.py
@@ -11,4 +11,4 @@ def kthCharacter(self, k):
11
def popcount(x):
12
return bin(x)[2:].count('1')
13
14
- return chr(ord('a')+popcount(k-1))
+ return chr(ord('a')+popcount(k-1)%26)
0 commit comments