Advertisement
MagicWinnie

Untitled

Dec 23rd, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. x, y = list(map(int, input().split(' ')))
  2. k=x+y
  3. v=0
  4. z=1
  5. if x==y:
  6.       pass
  7. elif x==1 and y==0:
  8.       print('1:0')
  9. elif x==1:
  10.       for j in range(1,y+1):
  11.             print(str(1)+':'+str(j))
  12. elif x==0:
  13.       i=0
  14.       for j in range(1,y+1):
  15.             print(str(0)+':'+str(j))
  16. elif y==0:
  17.       for j in range(1,x+1):
  18.             print(str(j)+':'+str(0))
  19. else:
  20.       for i in range(1,x):
  21.             print(str(i)+':'+str(0))
  22.       if x<y:
  23.             while z<=i:
  24.                   print(str(i)+':'+str(z))
  25.                   z+=1
  26.       else:
  27.             while z<=y:
  28.                   print(str(i)+':'+str(z))
  29.                   z+=1
  30.       for j in range(z-1,y+1):
  31.             print(str(i+1)+':'+str(j))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement