Skip to content

Commit 70cd796

Browse files
authored
Update hash_function.py
1 parent 80f3800 commit 70cd796

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hash_function.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
"""
@@ -23,4 +23,6 @@ def fastPower(self, a, b, n): # 参考fast_power.py实现快速取模
2323
if n % 2 == 1:
2424
return (((x * x) % b) * a) % b
2525
else:
26-
return (x * x) % b
26+
return (x * x) % b
27+
28+
# easy: http://lintcode.com/problem/hash-function

0 commit comments

Comments
 (0)