Update grader.py
This commit is contained in:
parent
9f03f49966
commit
f0010a5962
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ def getspace(size):
|
||||||
def generate_image(string, debug=False):
|
def generate_image(string, debug=False):
|
||||||
size = 0
|
size = 0
|
||||||
binstring = bin(int(string.encode("hex"), 16)).strip("0b")
|
binstring = bin(int(string.encode("hex"), 16)).strip("0b")
|
||||||
while size < 2 or getspace(size + 1) < len(binstring):
|
while size < 2 or getspace(size + 1) - 80 < len(binstring):
|
||||||
size += 1
|
size += 1
|
||||||
n = getspace(size)
|
n = getspace(size)
|
||||||
# print size, len(binstring)
|
# print size, len(binstring)
|
||||||
|
|
Loading…
Reference in a new issue