Skip to content

Commit bdcb01b

Browse files
authored
Update binary_representation.py
1 parent 8830c6c commit bdcb01b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

binary_representation.py

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

33
class Solution:
44
#@param n: Given a decimal number that is passed in as a string
55
#@return: A string
66
def binaryRepresentation(self, n):
77
# write you code here
8-
# TODO: 添加注释
98
bin_val = []
109
int_digits = 0
1110
for i in xrange(len(n)):
@@ -54,4 +53,6 @@ def roundUp(self, val, adjust): # 向上取整
5453
while i < adjust:
5554
ret *= 10
5655
i += 1
57-
return ret
56+
return ret
57+
58+
# hard: http://lintcode.com/zh-cn/problem/binary-representation/

0 commit comments

Comments
 (0)