- Code: Select all
from math import *
nbLoop,result=0,2
while (result!=1):
nbLoop+=1
if (fmod(result,2)):
result=result*3+1
else:
result*=2
#
Voilà , la machine ne sort pas de là ?!
from math import *
nbLoop,result=0,2
while (result!=1):
nbLoop+=1
if (fmod(result,2)):
result=result*3+1
else:
result*=2
#
Users browsing this forum: ClaudeBot [spider] and 0 guests