Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum67(nums):
- on = 0
- count = 0
- for i in range(len(nums)):
- if nums[i] == 6 and on == 0:
- nums[i] = 0
- on = True
- if nums[i] == 7 and on == 1:
- nums[i] = 0
- on = 0
- if on == 1:
- nums[i] = 0
- for i in range(len(nums)):
- count = count + nums[i]
- return count
Add Comment
Please, Sign In to add comment