잠시 후 내 코드가 올라간다. OverflowError: cannot convert float infinity to integer
. 내가이 작업을 수행 할 어떤 이유를 볼 수 없습니다, float로 변환 할 수없는 inf
def bugsInCode(begin):
bugs = begin
while bugs != 0:
print "%s bugs in the code, %s bugs\ntake one down patch it around, %s bugs in the code!" % (bugs, bugs, int(bugs * 1.5))
bugs = int(bugs * 1.5)
는 그러나,
1
또는
2
작품
1.5
교체, 작은 수레의 사용과 INF없이 사용할 수있다. 왜?
나는 코드가 약간의 자기 참조임을 알아 차렸다. – tox123