Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution(x,y):
- ID = 1
- if x==0 or y==0:
- raise ValueError
- else:
- # looking for the first number of every row
- for n in range(2,y+1):
- ID += 1 + (n-2)
- # sums out all the difference
- for n in range(2, x+1):
- ID += (2 + (n-2)) + (y-1)
- print ID
- solution(0,0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement