Advertisement
MagicWinnie

Untitled

Dec 23rd, 2018
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 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==0 and y==0:
  6.       print('0:0')
  7. elif x==0:
  8.       i=0
  9.       for j in range(1,y+1):
  10.             print(str(0)+':'+str(j))
  11. elif y==0:
  12.       for j in range(1,x+1):
  13.             print(str(j)+':'+str(0))
  14. elif x==y:
  15.       for j in range(1,x+1):
  16.             if j<x:
  17.                   print(str(j)+':'+str(0))
  18.       print(str(j)+':'+str(0))
  19.       for u in range(1,y+1):
  20.             print(str(j)+':'+str(u))
  21. else:
  22.       for i in range(1,x):
  23.             print(str(i)+':'+str(0))
  24.       if x<y:
  25.             while z<=i:
  26.                   print(str(i)+':'+str(z))
  27.                   z+=1
  28.       else:
  29.             while z<=y:
  30.                   print(str(i)+':'+str(z))
  31.                   z+=1
  32.       for j in range(z-1,y+1):
  33.             print(str(i+1)+':'+str(j))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement