Guest User

Untitled

a guest
May 11th, 2014
170
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from sys import*;l=map;r=range;n,m=l(int,stdin.readline().split());b=r(1,n+1)
  2. for k in r(m):v=b.pop((0,n-1)[k%2]);b.insert(n/2,v)
  3. print' '.join(l(str,b)
RAW Paste Data