a = 218500000000
s = 6
f = 2
k = 49
d = k + f + s
r = a
i = 0
while (r >= d):
r = r - d
#print ( r = ,r)
i = i+1
#print ( i = ,i)
print (i)
I think it does what I expect it to, but its way too slow to calculate such a large number, I waited 5 mins for i to print (while python used 100% cpu to calculate..), but it didn t. Is there a more efficient way of rewriting this piece of code so I can see how many iterations (i) it takes to complete?
Many thanks