Skip to content

Instantly share code, notes, and snippets.

@dketov
Last active April 29, 2016 14:36
Show Gist options
  • Save dketov/a75be385f03d723cea2f4e670dbf098f to your computer and use it in GitHub Desktop.
Save dketov/a75be385f03d723cea2f4e670dbf098f to your computer and use it in GitHub Desktop.
c=[int(i) for i in input().split()]
n=len(c)
for i in range(n):
right = (i+1)%n
left = (i+n-1)%n
print(c[left]+c[right], end=' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment