Jumping on the Clouds: Revisited

  • + 0 comments

    My python solution

    	```
    i =k
    	e = 100
    	if c[0] == 1:
    			e -= 3
    	else:
    			e -= 1
    	if len(c)== k:
    			return e
    	while k != 0:
    			if c[k] == 1:
    					e -= 3
    			else:
    					e -= 1
    			k += i
    			if k >= len(c):
    					k -= len(c)
    			print(k, c[k], e)
    	print(k, c[k], e)
    	return e
    

    `